Skip to content
/ fncore Public

Functional programming core library for Python.

License

Notifications You must be signed in to change notification settings

jtwool/fncore

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

fncore

A collection of functional programming for Python.

Quickstart

$ pip install fncore
$ python3

>>> from fncore import *
>>> xs = [1,2,3]
>>> reduce(fn.operator.add, xs)
6

Background

fncore was written to make the tools necessary for functional programming in Python easier to acces. By design, these tools are scattered across other modules: the built-ins functools, itertools and operator and the community-managed toolz and more-itertools. fncore collects the code from these sources and wraps them in a single namespace for easy access.

Use

Use of fncore is as simple as pip installing fncore and then importing the package. It is recommended that you * import fncore, even though this goes against Python conventions.

from fncore import *

Importing fncore in this way will bring some commonly used functions into your default namespace:

And the functional-support code will be stored under the fn namespace.

Location Source
fn.functools functools
fn.itertools itertools
fn.operator operator
fn.toolz toolz
fn.more_itertools more-itertools

About

Functional programming core library for Python.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages