Catch wrong number of arguments case
If a command gets the wrong number of arguments, tell the user.
This commit is contained in:
parent
5f3dfee5ac
commit
a936e985a4
1 changed files with 6 additions and 3 deletions
|
@ -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 '())
|
||||
|
|
Loading…
Reference in a new issue