# 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 pyfunk 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pyfunk-1.1.0.tar.gz | 22.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyfunk-1.1.0-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 51.8 kB
Release files / pyfunk-1.1.0.tar.gz
| Download URL | pyfunk-1.1.0.tar.gz |
|---|---|
| Size | 22.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6a9a2c2cf70a6466131a8d6848d5f862859382380a6f9217affd56e1fce66740
|
|
BLAKE2b-256 checksum How to use checksums |
6715365c437fc2c80d4c34869d0c21c3583a2b475c1ee82c10b1582222c28e89
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / pyfunk-1.1.0-py2.py3-none-any.whl
| Download URL | pyfunk-1.1.0-py2.py3-none-any.whl |
|---|---|
| Size | 29.8 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
5cf5a0199755fc9b3193ae53574663c3116017c7c0243b99596580421f2b3172
|
|
BLAKE2b-256 checksum How to use checksums |
5513a36902881126d9dd71085b1274552b4da55203a93f6e7b9fefc513a67f3e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |