Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The sequence popping out of 'nowehere' like this reminds me of a upenn cis194 Haskell homework*

Fib sequence can be expressed as:

F(x) = x / (1 − x − x^2)

where x is an infinite stream of 0,1,0,0,0....

and with sane definitions of divide, add, multiply, subtract for these streams.

* http://www.seas.upenn.edu/~cis194/spring13/hw/06-laziness.pd.... Ex 6



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: