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* ...)
(begin
(set! command-list
(cons (cons (symbol->string (quote name))
(lambda args
exp exp* ...))
(cons
(cons (symbol->string (quote name))
(case-lambda
(args
exp exp* ...)
(lst (format #t "Wrong number of arguments.~%"))))
command-list))))))
(define command-list '())