Woo!
Got it.
(define (whatdoicallthis lst func)
(let ((newlst (list list)))
(lfold (lambda (hd tl)
(set-cdr! hd (func tl))
(rest hd))
newlst
lst)
(rest newlst)))
(define (append hd tl)
(whatdoicallthis hd (lambda (nxt) (cons nxt tl))))
(define (map func lst)
(whatdoicallthis lst (lambda (nxt) (list (func nxt)))))
No comments yet.
Leave a Reply
-
Recent
-
Links
-
Archives
- October 2011 (1)
- January 2011 (2)
- August 2010 (5)
- July 2010 (5)
- May 2010 (3)
- March 2010 (10)
- February 2010 (7)
- November 2009 (1)
- October 2009 (1)
- August 2009 (1)
- July 2009 (3)
- April 2009 (2)
-
Categories
-
RSS
Entries RSS
Comments RSS