Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Libraries

    fx 0.2

    Download button

    No screenshots available
    Downloads: 58  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Philip Xu | More programs
    BSD License / FREE
    September 27th, 2012, 06:50 GMT
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    fx description

    A library for coding of higher-order functions

    fx is a Python module for higher-order function coding.

    Examples

    >>> from fx import f
    >>> double_all = f(map) >> double_all([1, 2, 3])
    [2, 4, 6]
    >>> double_all |= f(map) >> double_all([1, 2, 3])
    '2 4 6'
    >>> sum_upto = 1 .__add__ | f(range) >> sum_upto(100)
    5050
    >>> parse_hex_str = ~f(int) >> parse_hex_str('ff')
    255
    >>> parse_hex_str('c0ffee')
    12648430
    >>> # project euler problem 1
    >>> euler_p1 = f(range) > euler_p1(10)
    23
    >>> euler_p1(1000)
    233168
    >>> # project euler problem 20
    >>> fact = f(lambda n: 1 if n == 1 else n * fact(n - 1))
    >>> euler_p20 = str ** fact | sum ** f(map) >> euler_p20(10)
    27
    >>> euler_p20(100)
    648


    Installation

    pip install fx

    or from the source archive:

    make install

    Links

    Documentation:
     http://fx.readthedocs.org/

    Issue Tracker:
     https://bitbucket.org/pyx/fx/issues/

    Source Package @ PyPI:
     http://pypi.python.org/pypi/fx/

    Mercurial Repoistory @ bitbucket:
     https://bitbucket.org/pyx/fx/

    Git Repoistory @ Github:
     https://github.com/pyx/fx/


    Product's homepage

    Here are some key features of "fx":

    · Currying functions with

    Requirements:

    · Python

      


    TAGS:

    higher-order functions | coding functions | function coding | higher-order | function | programming

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM