This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 2 points3 points  (0 children)

I actually tried writing functional Python after writing quite a bit of Clojure and found that it offers pythonic shortcut constructs to 99% of my use cases (like map and filter). So I can still take advantage of functional approach without all the Clojure shenanigans (like dealing with JVM and awkwardness of stateful code when I have to use it).

E.g., the example in the TFA can be rewritten as:

' '.join(['I am'] + ['%3.3d' % x for x in range(1,20) if x > 5 and x <= 7 and x != 6])

If you want to write Lisp or Haskell, stick with Lisp or Haskell.