set-car! bug? (or feature)

From: Steve Pothier <pothiers_at_nemesis.tucson.saic.com>
Date: Mon, 9 Jan 1995 12:40:16 -0700

R4 says the following should produce an "error" (pg 16). Looks like
STk allows the function to be directly modified with set-car!

-sp-


STk> (define (foo) '(a b c))
#[undefined]
STk> (foo)
(a b c)
STk> (set-car! (foo) 'q)
#[undefined]
STk> (foo)
(q b c)
STk>


On the other hand ...


STk> (define (bar) (list 'a 'b 'c))
#[undefined]
STk> (bar)
(a b c)
STk> (set-car! (bar) 'q)
#[undefined]
STk> (bar)
(a b c)
STk>
Received on Mon Jan 09 1995 - 20:43:56 CET

This archive was generated by hypermail 2.3.0 : Mon Jul 21 2014 - 19:38:59 CEST