Functional programming in Python
Fri, 25 May 2001 09:06:18 +1200
Peter Douglass writes:
| but in ( foo ( bar (baz x) ) )
| You would want the following I think.
| foo . bar . baz x
| which does have the parens omitted, but requires the composition
Almost. To preserve the meaning, the composition syntax would need to
(foo . bar . baz) x
foo . bar . baz $ x
or something along those lines. I favour the one with parens around
the dotty part, and tend to use $ only when a closing paren is
threatening to disappear over the horizon.
return $ case ... of
... -- many lines