Lovable code

Today I ended up reading a particular post over at Black Grit, Inc. about their CafePress storefront.

Since mzscheme supports unicode, I would’ve done it like this (in R5RS code):

(define ♥
  (lambda xs
      (display "I ♥ ")
      (let loop ((xs xs))
        (display (car xs))
        (if (not (null? (cdr xs)))
              (display " ")
              (display "and ")
              (loop (cdr xs))))))))

so that you could write:

(♥ ’scheme)

Leave a Reply

Your email address will not be published. Required fields are marked *