Skip to main content

No project description provided

Project description

# Gakp-pyfunk
A set of functional tools for python. It is supposed to have the same interface as Gakp-jsfunk and Gakp-lispfunk

## Example
```python
from pyfunk.combinators import compose
from pyfunk.collections import fmap
from pyfunk.functors.io import IO


def get_file(filename):
'''@sig get_file :: String -> IO String '''
def open_file():
with open(filename) as f:
return f.read()
return IO(open_file)


def get_tokens(str):
return str.split()


def get_lenght_of_tokens(tokens):
return len(tokens)

tokenLength = compose(fmap(get_lenght_of_tokens), fmap(get_tokens), get_file)
print(tokenLength('.gitignore').unsafeIO())
```

## Contributing
Anyone can contribute using the fork and pull model.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gakp-pyfunk-0.4.0.tar.gz (18.4 kB view hashes)

Uploaded Source

Built Distribution

gakp_pyfunk-0.4.0-py3-none-any.whl (18.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page