In article <20000301135806.63607.qmail / hotmail.com>,
Dat Nguyen writes:
> Just get into Ruby and very curious to learn.
> Where to find an interactive Ruby?
Interactive one already exists in the official dists. Just get any
binary/(or get the source and make), then try the below:
$ ruby -r 'irb/main' -e IRB.start [ENTER]
irb(main):001:0> def fib(x)
irb(main):002:1> x < 2 ? 1 : fib(x-1) + fib(x-2)
irb(main):003:1> end
nil
irb(main):004:0> fib(3)
3
irb(main):005:0> fib(5)
8
irb(main):006:0> exit
$
--
OZAWA -Crouton- Sakuro
<mailto:crouton / duelists.org>
<http://www.duelists.org/~crouton/>
PGP: C98F 74E0 AEEB 4578 1DFC F650 3BE0 9627 11FC C9F5