Metadata-Version: 1.1
Name: pyfunctor
Version: 0.1
Summary: A Functor library for Python
Home-page: https://github.com/jnamika/pyfunctor
Author: Jun Namikawa
Author-email: jnamika@gmail.com
License: ISC License (ISCL)
Description: 
        pyfunctor is a Python Functor library that provides classes implementing
        lazy evaluation, pipeline operators and block syntax.
        
        An example of usages is following:
        
            >>> from functor import *
            >>> f = Functor(range(10)) >> c_(map)(lambda x: x * 2)
            ...                        >> c_(filter)(lambda x: x < 7)
            ...                        >> c_(sorted).key(lambda x: -x)  # the pipeline operator '>>' composes functions
            >>> run(f)  # lazy evaluation
            [6, 4, 2, 0]
        
        Furthermore, Functor object will work together with the 'with' statement.
        The object is only once evaluated after the with-block is done.
        
            >>> with Functor(range(10)) as box:
            ...     @c_(map)
            ...     def f(x):
            ...         y = x % 3
            ...         z = x + y
            ...         return x + y + z
            ...     @c_(sorted, keyword='key')
            ...     def g(x):
            ...         return (x % 7, x % 3, x)
            >>> box.value
            [0, 14, 8, 16, 10, 18, 4, 12, 6, 20]
        
Keywords: functor lazy pipeline block
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: ISC License (ISCL)
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.2
Classifier: Programming Language :: Python :: 3.3
Classifier: Topic :: Software Development :: Libraries :: Python Modules
