Guest User

Untitled

a guest
May 19th, 2017
84
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Note: This is syntatically valid ruby code, but it
  2. # does not work because ruby has a bounded callstack
  3.  
  4. myFunc = lambda do |n|
  5.   lambda do |f|
  6.     if (n == 0) then
  7.       f
  8.     else
  9.       q = myFunc.call(n-1)
  10.       r = ( q.call(q.call(f)) ).call("a")
  11.  
  12.       fa = q
  13.       for i in 0..r.length**2
  14.         fa = lambda do |func|
  15.           q.call(fa.call(func))
  16.         end
  17.       end
  18.  
  19.       fa.call(f)
  20.     end
  21.   end
  22. end
  23.  
  24. double = lambda do |str|
  25.   str + str
  26. end
  27.  
  28. puts (myFunc.call(65502).call(double).call("9"))
RAW Paste Data