Simple, silly code

September 22, 2009
by Arielle Soutar (as07)

Schools of fish or students!

(define whats-in-school?
(lambda (a n)
(when (eq? a ‘fish)
(for ((i (in-range n)))
(printf ” <o))))))<“)))
(when (eq? a ‘students)
(for ((i (in-range n)))
(printf ” O_o”)))

(whats-in-school? ‘fish 35)


Tags: , ,

2 Responses to “Simple, silly code”

  1.   hr09 Says:

    A ‘?’ is missing in the concluding function call.

    (whats-in-school ‘fish 35)

    should be

    (whats-in-school? ‘fish 35)

    Also, the quotation marks (” ”) and apostrophes (’ ’) have to be retyped into the Scheme editor (as ” ” and ‘ ‘) because Scheme refuses to read this character set’s inverted commas.

  2.   as07 Says:

    oh that’s a shame about having to retype all of the apostrophes and question marks!

    Will fix that call though…
    thanks for pointing it out!

Leave a Reply

You must be logged in to post a comment.