Simple functionnal style math library with array-input function