{
"info": {
"author": "Philip Xu",
"author_email": "pyx@xrefactor.com",
"bugtrack_url": null,
"classifiers": [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 2.6",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Topic :: Software Development :: Libraries :: Python Modules"
],
"description": "======================================\nfx - a functional programming approach\n======================================\n\n::\n\n ___\n | _|_ _\n | _|_'_|\n |_| |_,_|igher-order function coding.\n\n\nIntroduction\n============\n\n**TL;DR - YAGNI.**\n\nInspired by `Haskell `_'s rich set of operators,\nthis is an approach to functional programming with operators in `Python `_.\n\n \"It's fun... It's insane... It's insanely fun.\"\n\n -- John Doe\n\n\nFeatures\n--------\n\n- Currying functions with ``<<``, ``&``\n- Piping output of functions with ``|``\n- Composing functions with ``**``\n- Flipping order of arguments of function with ``~``\n- and more\n\n\nExamples\n--------\n\n::\n\n >>> from fx import f\n >>> double_all = f(map) << 2 .__mul__ | list\n >>> double_all([1, 2, 3])\n [2, 4, 6]\n >>> double_all |= f(map) << str | ' '.join\n >>> double_all([1, 2, 3])\n '2 4 6'\n >>> sum_upto = 1 .__add__ | f(range) << 1 | sum\n >>> sum_upto(100)\n 5050\n >>> parse_hex_str = ~f(int) << 16\n >>> parse_hex_str('ff')\n 255\n >>> parse_hex_str('c0ffee')\n 12648430\n >>> # project euler problem 1\n >>> euler_p1 = f(range) << 1 | f(filter) << (lambda n: n % 3 == 0 or n % 5 == 0) | sum\n >>> euler_p1(10)\n 23\n >>> euler_p1(1000)\n 233168\n >>> # project euler problem 20\n >>> fact = f(lambda n: 1 if n == 1 else n * fact(n - 1))\n >>> euler_p20 = str ** fact | sum ** f(map) << int\n >>> euler_p20(10)\n 27\n >>> euler_p20(100)\n 648\n\n\nRequirements\n============\n\n- CPython >= 2.6\n\n\nInstallation\n============\n\nInstall from PyPI::\n\n pip install fx\n\nInstall from source, download source package, decompress, then ``cd`` into source directory, run::\n\n make install\n\n\nLicense\n=======\n\nBSD New, see LICENSE for details.\n\n\nLinks\n=====\n\nDocumentation:\n http://fx.readthedocs.org/\n\nIssue Tracker:\n https://bitbucket.org/pyx/fx/issues/\n\nSource Package @ PyPI:\n http://pypi.python.org/pypi/fx/\n\nMercurial Repository @ bitbucket:\n https://bitbucket.org/pyx/fx/\n\nGit Repository @ Github:\n https://github.com/pyx/fx/",
"description_content_type": null,
"docs_url": null,
"download_url": "https://bitbucket.org/pyx/fx/get/0.3.tar.bz2",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "https://bitbucket.org/pyx/fx/",
"keywords": null,
"license": "BSD-New",
"maintainer": null,
"maintainer_email": null,
"name": "fx",
"package_url": "https://pypi.org/project/fx/",
"platform": "UNKNOWN",
"project_url": "https://pypi.org/project/fx/",
"project_urls": {
"Download": "https://bitbucket.org/pyx/fx/get/0.3.tar.bz2",
"Homepage": "https://bitbucket.org/pyx/fx/"
},
"release_url": "https://pypi.org/project/fx/0.3/",
"requires_dist": null,
"requires_python": null,
"summary": "fx - a functional programming approach",
"version": "0.3"
},
"last_serial": 1125244,
"releases": {
"0.1": [
{
"comment_text": "",
"digests": {
"md5": "cfe2905e8b4d9307b41f3215883fe0f9",
"sha256": "444d11d21b809b5b2439e1542bfb0900f7230e7827104d41c131a60368081ca7"
},
"downloads": -1,
"filename": "fx-0.1.tar.gz",
"has_sig": true,
"md5_digest": "cfe2905e8b4d9307b41f3215883fe0f9",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 16900,
"upload_time": "2012-09-24T03:09:10",
"url": "https://files.pythonhosted.org/packages/14/9c/71d7290f7b0876784a71c6cdb9f8a2913a78c434e2e727857816837708d3/fx-0.1.tar.gz"
}
],
"0.1-dev": [],
"0.2": [
{
"comment_text": "",
"digests": {
"md5": "bd2461112e4f1502405d44ae571ee2fe",
"sha256": "536e0db607549a79091d29aebde4172a7237f2331792205107fa7db4a34ed644"
},
"downloads": -1,
"filename": "fx-0.2.tar.gz",
"has_sig": true,
"md5_digest": "bd2461112e4f1502405d44ae571ee2fe",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 17486,
"upload_time": "2012-11-20T08:55:12",
"url": "https://files.pythonhosted.org/packages/01/db/b513fbd6df651d27e04bbacf336ae269c43d94c1697d57434b0f30ffc20a/fx-0.2.tar.gz"
}
],
"0.3": [
{
"comment_text": "",
"digests": {
"md5": "54e06fc1c659328523a299ea3993a077",
"sha256": "4fcdcae90e42c7f9eeb4233522fff4c6b50639075da4a0faed0c5b300dd11bcc"
},
"downloads": -1,
"filename": "fx-0.3.tar.gz",
"has_sig": true,
"md5_digest": "54e06fc1c659328523a299ea3993a077",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 19342,
"upload_time": "2014-06-15T06:45:53",
"url": "https://files.pythonhosted.org/packages/9a/89/03dd35e498c7f9d8e95ba2da6382da5cd825863cc972b4f7cb56921f1ff9/fx-0.3.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "54e06fc1c659328523a299ea3993a077",
"sha256": "4fcdcae90e42c7f9eeb4233522fff4c6b50639075da4a0faed0c5b300dd11bcc"
},
"downloads": -1,
"filename": "fx-0.3.tar.gz",
"has_sig": true,
"md5_digest": "54e06fc1c659328523a299ea3993a077",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 19342,
"upload_time": "2014-06-15T06:45:53",
"url": "https://files.pythonhosted.org/packages/9a/89/03dd35e498c7f9d8e95ba2da6382da5cd825863cc972b4f7cb56921f1ff9/fx-0.3.tar.gz"
}
]
}