Guest User

Untitled

a guest
Feb 19th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.15 KB | None | 0 0
  1. class Proc
  2. def y(*args)
  3. call(self, *args)
  4. end
  5. end
  6.  
  7. p lambda { |this, n|
  8. return 1 if n == 0 || n == 1
  9. this.y(n-1) + this.y(n-2)
  10. }.y(10)
Add Comment
Please, Sign In to add comment