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

4.2.3 Sequencing

library syntax: begin <expression1> <expression2> …,

The <expression>s are evaluated sequentially from left to right, and the value(s) of the last <expression> is(are) returned. This expression type is used to sequence side effects such as input and output.

(define x 0)

(begin (set! x 5)
       (+ x 1))                        ⇒  6

(begin (display "4 plus 1 equals ")
       (display (+ 4 1)))              ⇒  unspecified
          and prints  4 plus 1 equals 5

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

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