ts=: 6!:2 , 7!:[EMAIL PROTECTED]
t =: 3 : 'y > 1'
fib =: base_case ` rec_case @. t
rec_case =: 3 : '( fib (y-1) ) + ( fib (y-2) )'
base_case =: 1:
fib 27
317811
ts 'fib 27'
5.86374 48576
f0b=: (-&2 +&$: -&1) ^: (1&<)
f=: 1:`f0b @. (2:<])"0
f i: 9
1 1 1 1 1 1 1 1 1 1 1 1 2 3 5 8 13 21 34
f 28
317811
ts 'f 28'
1.20597 13440
5.86374 48576 % 1.20597 13440
4.86226 3.61429
--
Tracy B. Harms
It is the central thesis of this book that the descriptive
and analytic power of an adequate programming language amply
repays the considerable effort required for its mastery.
Kenneth E. Iverson
A Programming Language, 1962
____________________________________________________________________________________Got
a little couch potato?
Check out fun summer activities for kids.
http://search.yahoo.com/search?fr=oni_on_mail&p=summer+activities+for+kids&cs=bz
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm