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* ...)
|
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 '())
|
||||||
|
|
Loading…
Reference in a new issue