Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Knuth's up-arrow notation

Name: Anonymous 2007-08-07 11:37 ID:ywrNHFyl

(defun knuth (x n)
  (if (= n 2)
      (return-from knuth (expt x x))
    (return-from knuth (expt x (knuth x (- n 1))))
    )
)


Yes, an implementation in 6 lines of Lisp. What is Knuth's up-arrow notation? Wikipedia that shit. Don't try this with anything greater than (knuth 3 3), or you will overflow. (knut 3 3) == 3^3^3. (knuth 3 4) == 3^3^3^3.

Name: Anonymous 2007-08-10 17:01 ID:SPbFvEWz

>>67
(((ok bitch)
  (you asked for it)
  (here goes))
 (im taking out the fucking
     (bold paranthesis on you))
 (you fuqing angered an expert programmer)
 (ive been here for (expt 3 88888000) years longer than you)
 (ive read sicp twice)
 (i know every programming language in the world
    including apl)
 (if u wanna batl (lets do it))
 (ill crush you like a bean))

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List