functional programming
Jason Stokes
jstok at bluedog.apana.org.au
Wed Feb 23 10:00:12 EST 2000
More information about the Python-list mailing list
Wed Feb 23 10:00:12 EST 2000
- Previous message (by thread): functional programming
- Next message (by thread): functional programming
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Remco Gerlich wrote in message ... >Michal Wallace (sabren) wrote in comp.lang.python: >> I guess my original question had to do with what functional >> programming looks like in the wild, and what it might look like in >> python. Aahz posted a recursive version of a fib() routine. Is this >> not what you'd want? What would fib() look like in one of the >> functional languages you're used to? > >Michael Hudson posted this little bit of Haskell last week: > >fib = 1 : 1 : [ a+b | (a,b) <- zip fib (tail fib) ] > >I can't translate that to anything resembling Python at all. I don't >know if list comprehensions in Python will be/are this powerful. This example exploits lazy evaluation. Since Python is strict, like most procedural languages, it isn't possible to produce this in Python.
- Previous message (by thread): functional programming
- Next message (by thread): functional programming
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list