Catch wrong number of arguments case

If a command gets the wrong number of arguments, tell the user.
This commit is contained in:
Tom Willemse 2013-06-05 01:07:56 +02:00
parent 5f3dfee5ac
commit a936e985a4

View file

@ -34,9 +34,12 @@
exp exp* ...) exp exp* ...)
(begin (begin
(set! command-list (set! command-list
(cons (cons (symbol->string (quote name)) (cons
(lambda args (cons (symbol->string (quote name))
exp exp* ...)) (case-lambda
(args
exp exp* ...)
(lst (format #t "Wrong number of arguments.~%"))))
command-list)))))) command-list))))))
(define command-list '()) (define command-list '())