Updating.

This commit is contained in:
Elf M. Sternberg 2015-07-03 12:58:08 -07:00
parent c2ff0a3d88
commit f711432626
1 changed files with 4 additions and 4 deletions

View File

@ -12,7 +12,7 @@ class Continuation
constructor: (@k) ->
invoke: (v, env, kont) ->
if nilp cdr v
resume @k, (car v)
@k.resume (car v)
else
throw "Continuations expect one argument", [v, env, kont]
@ -200,6 +200,9 @@ defprimitive = (name, nativ, arity) ->
else
throw "Incorrect arity")
defpredicate = (name, nativ, arity) ->
defprimitive name, ((a, b) -> if nativ.call(null, a, b) then true else the_false_value), arity
the_false_value = (cons "false", "boolean")
definitial "#t", true
@ -211,9 +214,6 @@ for i in [
definitial i
defpredicate = (name, nativ, arity) ->
defprimitive name, ((a, b) -> if nativ.call(null, a, b) then true else the_false_value), arity
defprimitive "cons", cons, 2
defprimitive "car", car, 2
defprimitive "set-cdr!", setcdr, 2