Bugfix: support map^3.
* module/mes/base-0.scm (map): Support third list, add more visible error when used with 4 or more list.
This commit is contained in:
parent
15eabee623
commit
c93096fe5f
|
@ -85,7 +85,10 @@
|
||||||
(if (null? l) '()
|
(if (null? l) '()
|
||||||
(if (null? r) (cons (f (car l)) (map f (cdr l)))
|
(if (null? r) (cons (f (car l)) (map f (cdr l)))
|
||||||
(if (null? (cdr r))
|
(if (null? (cdr r))
|
||||||
(cons (f (car l) (caar r)) (map f (cdr l) (cdar r)))))))
|
(cons (f (car l) (caar r)) (map f (cdr l) (cdar r)))
|
||||||
|
(if (null? (cddr r))
|
||||||
|
(cons (f (car l) (caar r) (caadr r)) (map f (cdr l) (cdar r) (cdadr r)))
|
||||||
|
'*MAP-4-NOT-SUPPORTED)))))
|
||||||
|
|
||||||
(define-macro (simple-let bindings . rest)
|
(define-macro (simple-let bindings . rest)
|
||||||
(cons (cons 'lambda (cons (map car bindings) rest))
|
(cons (cons 'lambda (cons (map car bindings) rest))
|
||||||
|
|
Loading…
Reference in a new issue