Content deleted Content added
Artoria2e5 (talk | contribs) |
Artoria2e5 (talk | contribs) |
||
Line 23:
<syntaxhighlight lang="python">
import partial from functools
def compose(*fns):
return
example = compose(baz, bar, foo)
</syntaxhighlight>
For a more complex example, the Haskell code {{code|1=p = ((.) f) . g}} can be translated as:
<syntaxhighlight lang="python">
p = partial(compose, partial(compose, f), g)
</syntaxhighlight>
|