Welcome to the CHICKEN Scheme pasting service

Thou shalt not mutate literals pasted by alaricsp on Wed Aug 15 13:36:14 2012

Here's a nice pure function with predictable semantics:

#;6> (define (a foo) '(1 2 3))
#;7> (a 1)
(1 2 3)
#;8> (a 2)
(1 2 3)

But oh no you can break it:

#;9> (set-car! (a 1) 5)

And now it's broken:

#;10> (a 2)
(5 2 3)
#;11> (a 3)
(5 2 3)

get out of it added by certainty on Wed Aug 15 13:40:42 2012

#;6> (define (a* _) (list 1 2 3))
#;7> (a* 1)
(1 2 3)
#;8> (a* 2)
(1 2 3)
#;9> (set-car! (a* 1) 5)
#;10> (a* 1)
(1 2 3)
#;11> (a* 2)
(1 2 3)

Your annotation:

Enter a new annotation:

Your nick:
The title of your paste:
Your paste (mandatory) :
Which R5RS procedure can be used to concatenate strings?
Visually impaired? Let me spell it for you (wav file) download WAV