dbrattli / Expression

Pragmatic functional programming for Python inspired by F#
https://expression.readthedocs.io
MIT License
421 stars 30 forks source link

Fix python error in introduction.md #151

Closed garyrob closed 1 year ago

garyrob commented 1 year ago

It had:

let compose(f: Callable[[A], B], g: Callable[[B], C]) -> Callable[[A], C]:
    lambda x: g(f(x))

And should have been:

def compose(f: Callable[[A], B], g: Callable[[B], C]) -> Callable[[A], C]:
    return lambda x: g(f(x))
dbrattli commented 1 year ago

Thanks for fixing!