mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-23 20:15:05 +02:00
Added (list-copy)
This commit is contained in:
parent
8b972b7421
commit
02d0054afc
1 changed files with 2 additions and 0 deletions
|
@ -99,6 +99,8 @@
|
|||
'()
|
||||
(cons obj (make (- n 1) obj) )))))
|
||||
(make k x)))
|
||||
(define (list-copy lst)
|
||||
(foldr (lambda (x y) (cons x y)) '() lst))
|
||||
(define (map func lst)
|
||||
(foldr (lambda (x y) (cons (func x) y)) '() lst))
|
||||
(define (for-each f lst)
|
||||
|
|
Loading…
Add table
Reference in a new issue