mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-07-07 05:06:37 +02:00
fixing bug in map-onto
This commit is contained in:
parent
d7147bf67e
commit
88cae35481
1 changed files with 2 additions and 2 deletions
|
@ -1,9 +1,9 @@
|
|||
;; misc.scm -- miscellaneous list utilities
|
||||
;; Copyright (c) 2009 Alex Shinn. All rights reserved.
|
||||
;; Copyright (c) 2009-2011 Alex Shinn. All rights reserved.
|
||||
;; BSD-style license: http://synthcode.com/license.txt
|
||||
|
||||
(define (map-onto proc ls init)
|
||||
(let lp ((ls ls) (res init))
|
||||
(let lp ((ls (reverse ls)) (res init))
|
||||
(if (null? ls) res (lp (cdr ls) (cons (proc (car ls)) res)))))
|
||||
|
||||
(define (append! . lists) (concatenate! lists))
|
||||
|
|
Loading…
Add table
Reference in a new issue