manpagez: man pages & more
info r5rs
Home | html | info | man
[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.1.6 Assignments

syntax: set! <variable> <expression>

<Expression> is evaluated, and the resulting value is stored in the location to which <variable> is bound. <Variable> must be bound either in some region enclosing the ‘set!’ expression or at top level. The result of the ‘set!’ expression is unspecified.

(define x 2)
(+ x 1)                                ⇒  3
(set! x 4)                             ⇒  unspecified
(+ x 1)                                ⇒  5

This document was generated on March 31, 2014 using texi2html 5.0.

© manpagez.com 2000-2024
Individual documents may contain additional copyright information.