small bug in example
This commit is contained in:
@@ -44,11 +44,11 @@ definition early.
|
||||
|
||||
@racketblock[
|
||||
(define/return (status->symbol code)
|
||||
(unless (number? code)
|
||||
(return 'not-a-number))
|
||||
(when (= code 0) (return 'ok))
|
||||
(when (< code 0) (return 'failed))
|
||||
(when (> code 5) (return 'out-of-range))
|
||||
(unless (number? code)
|
||||
(return 'not-a-number))
|
||||
(cond
|
||||
((= code 1) 'normal)
|
||||
((>= code 2) (string->symbol (format "code-~a" (* code code))))
|
||||
|
||||
Reference in New Issue
Block a user