kachayev / fn.py

Functional programming in Python: implementation of missing features to enjoy FP
Other
3.35k stars 204 forks source link

There are wrong comments here #93

Closed pppppkun closed 1 year ago

pppppkun commented 2 years ago
class F(object):
    def __rshift__(self, g):
        """Overload << operator for F instances"""
        return self.__class__.__compose(self.__ensure_callable(g), self.f)

    def __lshift__(self, g):
        """Overload >> operator for F instances"""
        return self.__class__.__compose(self.f, self.__ensure_callable(g))

the operator >> is right shift and << is left shift respectively

ftsfranklin commented 1 year ago

This was fixed in #70 in 2014. It wasn't pushed to the PyPI version, though.

There's a fork of this project which was updated this year: https://pypi.org/project/fn.py/