Hi Lothar, The if statement in Racket always requires three arguments:
(if<http://docs.racket-lang.org/reference/if.html?q=if&q=mapcar&q=map&q=foldl&q=take&q=append*&q=foldl&q=number-%3E&q=vector&q=for/&q=set#(form._((quote._~23~25kernel)._if))> test-expr then-expr else-expr) if you only want a "then-expression", use "when" or "unless" if you want more expressions, use "cond", cond is a powerful and compact construct in Racket -Joe On Wed, Apr 11, 2012 at 11:42 AM, lothar atheling <loth...@warpmail.net>wrote: > > usually an (if ...) form without an else part does not cause an error. > > but sometimes it does, as the following shows: > > > if: bad syntax (must have an "else" expression) in: (if isinitialised > (expose)) > > why the different behavior? > > -- > http://www.fastmail.fm - A fast, anti-spam email service. > > ____________________ > Racket Users list: > http://lists.racket-lang.org/users >
____________________ Racket Users list: http://lists.racket-lang.org/users