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.
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyfunk-1.1.0.tar.gz
(22.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyfunk-1.1.0.tar.gz.
File metadata
- Download URL: pyfunk-1.1.0.tar.gz
- Upload date:
- Size: 22.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6a9a2c2cf70a6466131a8d6848d5f862859382380a6f9217affd56e1fce66740
|
|
| MD5 |
025a46a7626f21685ee3a0b3d0755d99
|
|
| BLAKE2b-256 |
6715365c437fc2c80d4c34869d0c21c3583a2b475c1ee82c10b1582222c28e89
|
File details
Details for the file pyfunk-1.1.0-py2.py3-none-any.whl.
File metadata
- Download URL: pyfunk-1.1.0-py2.py3-none-any.whl
- Upload date:
- Size: 29.8 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5cf5a0199755fc9b3193ae53574663c3116017c7c0243b99596580421f2b3172
|
|
| MD5 |
50fd6adc1f24ac9cac3f4221e3a6b660
|
|
| BLAKE2b-256 |
5513a36902881126d9dd71085b1274552b4da55203a93f6e7b9fefc513a67f3e
|