Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # In the Ruby file, foo.rb
- class Foo
- def fib(n)
- if (n < 2)
- n
- else
- fib(n - 2) + fib(n - 1)
- end
- end
- end
- # In the Duby file, foo.duby
- class Foo
- method fib
- takes n => Integer::TYPE
- returns Integer::TYPE
- end
- end
Add Comment
Please, Sign In to add comment