Neil Toronto wrote:

What's your favorite not just computable, but tweetable function?

(define (r n)
  (for/fold ([s 1] [l '()]) ([i n])
    (values (/ 1 (- (* 2 (floor s)) s -1)) (cons s l))))

I tweeted this to make sure it fit. I had 23 characters to spare, could squeeze a bit of whitespace out, then use the rest to make it more elegant, but I have actual work to do... --PR
____________________
 Racket Users list:
 http://lists.racket-lang.org/users

Reply via email to