The following code is bigger than the limit, but I've always thought
it was cute:

#lang racket
;; see: http://mail.python.org/pipermail/tutor/2001-April/004888.html
(define (a n) (* 2 n (add1 (* 2 n))))
(define (b x y) (if (<= (abs x) (abs y))
                    (+ (a (- y)) (abs (- y x)))
                    (- (a (- x)) (abs (- y x)))))
(for* ([y (in-range 5 -5 -1)])
  (for ([x (in-range -5 5)])
    (printf "~a\t" (b x y)))
  (newline))
____________________
  Racket Users list:
  http://lists.racket-lang.org/users

Reply via email to