Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python functional programming snippets

I've seen some elegant python snippets using list comprehension and map reduce. Can you share some of these code or a web site.

Thanks.

like image 927
user253951 Avatar asked Jan 19 '10 12:01

user253951


1 Answers

Python is not lisp. Please don't try to make it look that way. It only reduces one of python's biggest strengths, which is its readability and understandability later on.

If you like functional programming, learn Haskell, ML, or F#. You will be amazed at what those languages offer (pure functions to start with).

like image 173
Joe Koberg Avatar answered Nov 10 '22 01:11

Joe Koberg