An example for creating pip installable packages
pip install git+https://github.com/tomginsberg/funcnotation.git
from funcnotation import PrePostFix as P
# find the sum of 8 random integers squared
P(sum) @ ([randint(0, 10) for _ in range(8)] // P(lambda x: [i**2 for i in x]))
from funcnotation import PrePostFix as P
import numpy as np
def reshape(*size):
def f(x):
return np.reshape(x, size=size)
return P(f)
[1,2,3,4] // reshape(2,2)
# array([[1, 2],
# [3, 4]])