Permalink
Browse files

`bind-args` doesn't require the `list` module.

  • Loading branch information...
1 parent 327f6bc commit e2d53e564d77955f9449335a9013a78ca571f546 @cpressey cpressey committed Apr 20, 2012
Showing with 18 additions and 4 deletions.
  1. +14 −0 doc/module/Bind-Args.markdown
  2. +4 −4 module/bind-args_0_1.robin
@@ -77,3 +77,17 @@ become clear here: typically you would just pass the macro's `args` and
| (subtract a (subtract 0 b))))
| (add (subtract 0 0))))
? uncaught exception: (illegal-arguments ((subtract 0 0)))
+
+ | (robin (0 1) ((small (0 1) *) (bind-args (0 1) *))
+ | (bind add (macro (self args env)
+ | (bind-args (a b) args env
+ | (subtract a (subtract 0 b))))
+ | (add 9 9 9)))
+ ? uncaught exception: (illegal-arguments (9 9 9))
+
+ | (robin (0 1) ((small (0 1) *) (bind-args (0 1) *))
+ | (bind add (macro (self args env)
+ | (bind-args (a b) args env
+ | (subtract a (subtract 0 b))))
+ | (add 1 n)))
+ ? uncaught exception: (unbound-identifier n)
@@ -1,4 +1,4 @@
-(robin (0 1) ((small (0 1) *) (list (0 1) *))
+(robin (0 1) ((small (0 1) *))
;''Should really be a part of small, but prototyping
it here now.''
(let (
@@ -12,11 +12,11 @@
(bind-args-r (fun (self id-list val-list env-acc)
;''This will need to be converted into a macro at some point,
but for now, this is easier.''
- (if (empty? id-list)
- (if (empty? val-list)
+ (if (equal? id-list ())
+ (if (equal? val-list ())
env-acc
(raise (list (literal illegal-arguments) orig-val-list)))
- (if (empty? val-list)
+ (if (equal? val-list ())
(raise (list (literal illegal-arguments) orig-val-list))
(self self (tail id-list) (tail val-list)
(prepend

0 comments on commit e2d53e5

Please sign in to comment.