- Lisp Scheme Part38
760 :デフォルトの名無しさん[sage]:2014/06/16(月) 12:15:45.92 ID:QdbRzEa/ - The Little Schemerで number?は基本関数だからatom?などと同じように定義できませんという記述があるんだけども、
できますよね atom?に関しては注で (deifne atom? (lambda (x) (and (not (pair? x)) (not (null? x))))) とされてますし、number?は (define number? (lambda (x) (and (not (pair? x)) (not (symbol? x)) (not (string? x)) (not (eq? x #t)) (not (eq? x #f))))) でいけると思うんですが、間違いですか?
|