From: Christian Neukirchen Date: 2005-12-16T00:51:16+09:00 Subject: Re: ruby beats them all Stephen Kellett writes: > In message , Christian Neukirchen > writes >>def fib(n) >> (1..n-2).inject([1, 1]) { |(a, b), n| [b, a+b] }.last >>end > > Thats about as readable as APL. Maintenance nightmare. I disagree. APL isn't about readability to outsiders (and this is IMO not a thing every language needs to strive for, sometimes there are things more important). Take this piece of J: f =: 1:`($:@<:&<:+$:@<:)@.(1:<]) (taken from http://cubbi.org/serious/fibonacci/j.html) Or, in K: fibonacci:{x(|+\)\1 1} (taken from http://www.kuro5hin.org/?op=displaystory;sid=2002/11/14/22741/791) Or, again in K: fx:{x{x,+/-2#x}/0 1} (taken from http://www.kx.com/listbox/k/msg05165.html) These all are far more unreadable to me, even though I know the basics of APL... Besides, what is there to maintain about fibonacci? > Stephen -- Christian Neukirchen http://chneukirchen.org