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)