Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (define (string-cumulative source)
- (let ((prefix ""))
- (map
- (lambda (c)
- (set! prefix (string-append prefix c))
- prefix)
- source)))
- (write (string-cumulative '("A" "B" "C")))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement