15 Nov 2008, 08:18
Jfb_pragsmall

Jean-François Brouillet (1 post)

Page 33 introduces + with more than 2 arguments. So, it might be a good idea, page 34, when introducing < to show that

user=> (< 3 4 5)
true
user=> (< 3 4 5 2)
false

And then illustrate why this is useful:
user=> (defn in-bound? [x min max]
               (<= min x max))
#'user/in-bound?
user=> (in-bound? 2 3 4)
false
user=> (in-bound? 2 1 4)
true
23 Nov 2008, 15:40
Stu-small_pragsmall

Stuart Halloway (76 posts)

Nice idea, thanks! I have added it to a list of possible changes for Beta 4.

Cheers,
Stuart

  You must be logged in to comment