Variadic Functions in PureScript
Here’s a function that will take an arbitrary number of int
s as arguments.
Variadic functions can be called in the usual way with individual arguments.
If you already have multiple args in a slice, apply them to a variadic function using the list.
Another key aspect of functions in PureScript is their ability to form closures, which we’ll look at next.