# 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.
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.
Metadata
Release files for gakp-pyfunk 0.4.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| gakp_pyfunk-0.4.1-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Release files / gakp_pyfunk-0.4.1-py2.py3-none-any.whl
| Download URL | gakp_pyfunk-0.4.1-py2.py3-none-any.whl |
|---|---|
| Size | 23.4 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
7835bdb1eca9919f6c20dc7b3a72b272dced806382f93c72594ea3ed02f94f83
|
|
BLAKE2b-256 checksum How to use checksums |
c87771a1cf79d078dd37b39b791313326a4541d0c30950d144cb5de8d0ac79cd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |