Add map to amb-utilities
This commit is contained in:
parent
3d5db17a33
commit
32eabfa3e0
|
@ -20,5 +20,10 @@
|
||||||
(cond ((null? items) true)
|
(cond ((null? items) true)
|
||||||
((null? (cdr items)) true)
|
((null? (cdr items)) true)
|
||||||
((member (car items) (cdr items)) false)
|
((member (car items) (cdr items)) false)
|
||||||
(else (distinct? (cdr items)))))))
|
(else (distinct? (cdr items)))))
|
||||||
|
|
||||||
|
(define (map f l)
|
||||||
|
(if (null? l) '()
|
||||||
|
(cons (f (car l))
|
||||||
|
(map f (cdr l)))))))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue