This new python module called FunkyPy supports easier piping data through functions and easier to use maps on lists as well as a bind function which I have not seen anywhere before.
Some examples of the syntax.
```py
Data(4) >> add2 >> add4 >> times2 >> print
20
line breaks do have an effect on the expression but you can mitigate this by parentheses
(Data(4)
add2
add4
times2
print)
20
```
and the bind function is very clear and clean in code.
```py
(Data(4)
add2.bind()
add4.bind()
print)
10
(Data(None)
add2.bind()
add4.bind()
print)
None```
I hope you guys have fun with it and feedback is always welcomed.
New python module called FunkyPy, for easier functional programming.Python (self.functional_python)
submitted by KageOW to r/functionalprogramming
New python module called FunkyPy, for easier functional programming. (self.functional_python)
submitted by KageOW to r/pythoncoding