? ?

Sometimes you want a function that does something very simple, like adding one to a number. The full function syntax is cumbersome for this. Instead you can write (? + 1), which is a function with a single parameter that adds one to get the result. If you have multiple question marks, e.g. ? * ?, the function has as many parameters as there are question marks.

The function extends to the single expression that the question mark(s) appear in. So 0 <= ? < ? <= 1 takes two parameters and checks that the first is less than the second, and they are both between zero and one. The expression (? + 1) * 2 is a type error because you can't multiply a function like two (use the full function syntax instead).

ExamplesClick an example to insert it
apply each([3,7,-4], (? + 1))[4,8,-3]
combine([2, 4, 3], (? * ?))24