Open m-bock opened 5 years ago
The README is actually about having a more intuitive way of translating the function overloading in the p5.js API. For example, the p5.js "vertex" function (https://p5js.org/reference/#/p5/vertex) has two function signatures:
vertex(x, y)
vertex(x, y, z, [u], [v])
In purescript-p5, these are implemented as "vertex" and "vertex2", respectively (see https://pursuit.purescript.org/packages/purescript-p5/0.10.0/docs/P5.Shape). Some p5.js functions like "background" have 6 signatures (https://p5js.org/reference/#/p5/background). This makes it hard to determine which function in purescript-p5 to use.
As noted in the TODO section on the Readme:
Would this be the pattern?
Another way would be to omit the necessary first arg 'P5` in the counting :/