[Update] Illegible fibonacci sequence
Posted by Doomshammer
on Saturday, January 20. 2007
at 12:46
in Anwendungen, English only, Privat, Thoughts
Today I though I'd build a quick fibonacci sequence script. And as I like to build ugly code, here is my try to make it a bit illegible:
QUOTE:
perl -le'for(0..42){f($_,\@f);print"f($_): $f[-1]";}sub f{($n,$f)=@_;if($n==1or$n==0){$$f[$n]=$n}$$f[$n]=$$f[$n-2]+$$f[$n-1];}'
The result looks like this:
QUOTE:
f(0): 0
f(1): 1
f(2): 1
f(3): 2
f(4): 3
f(5): 5
f(6): 8
f(7): 13
f(8): 21
f(9): 34
f(10): 55
[...]
f(1): 1
f(2): 1
f(3): 2
f(4): 3
f(5): 5
f(6): 8
f(7): 13
f(8): 21
f(9): 34
f(10): 55
[...]
Now I wanna see your illegible version of a fibonacci sequence script/programm. Language it's written in doesn't matter
(@strcat: looking forward to see yours


