fork download
  1. # Fish number 3
  2. class Proc
  3. def <<(other)
  4. -> (*args) { self[other[*args]] }
  5. end
  6.  
  7. def ^(n)
  8. return -> x { x } if n == 0
  9. return self << (self ^ (n - 1))
  10. end
  11. end
  12.  
  13. s =
  14. -> n { -> f {
  15. if n == 1
  16. -> x { (f ^ x)[x] }
  17. else
  18. -> x { (s[n - 1] ^ x)[f][x] }
  19. end
  20. } }
  21.  
  22. ss =
  23. -> n { -> f {
  24. if n == 1
  25. -> x { s[x][f][x] }
  26. else
  27. -> x { (ss[n - 1] ^ x)[f][x] }
  28. end
  29. } }
  30.  
  31. f = -> x { x + 1 }
  32.  
  33. F3_F = (ss[2] ^ 63)[f]
  34.  
  35. F3 = (F3_F ^ 63)[3]
  36. puts F3
Runtime error #stdin #stdout #stderr 0.06s 17288KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
prog.rb:4: stack level too deep (SystemStackError)