Use of begin

Use begin when you need to do multiple things in a place where a single form is required:


   (if (fire?)
       (begin (go-outside)
              (call-fire-dept) )
       (begin (get-beer)
              (turn-on-tv) ) )
The if special form requires a single form for the then and else parts, so a begin must be used if multiple things need to be done.

Contents    Page-10    Prev    Next    Page+10    Index