[Haskell-cafe] (mostly OT) Strange patterns of commas

Matthew Brecknell matthew at brecknell.net
Sun Sep 27 18:56:29 EDT 2009


Now see if you can tell us why this pattern is similar:

[ replicate n '-' | n <- [140..171] ]

Hint: Look at the closed form as n gets big:

http://en.wikipedia.org/wiki/Fibonacci_number#Closed_form_expression

After that, you can tell us why it's a parabola.


Matthias Kilian wrote:
> Fibonacci numbers are always surprising.
> 
> Try this on a terminal that's 159 characters wide (using a properly
> sized xterm(1) may be a good idea):
> 
> let f = 1 : 1 : zipWith (+) f (tail f) in take 780 f
> 
> Ciao,
> 	Kili
> 



More information about the Haskell-Cafe mailing list