Here we have a simple function that returns the argument plus two.
If a block has only one line, we can leave off the return and the semicolon.
We can also make a closure, a function inside another one.
We can leave the type off of a lambda's parameter, to make it shorter. 0
In Vale, functions and methods are the same thing, so these two calls are exactly equivalent.
This is known as Universal Function Call Syntax, or UFCS. This makes method chaining nicer, for example:
a.f(3).g(true).h("Yendor")
as opposed to
h(g(f(a, 3), true), "Yendor").
Taking out the parameter's type makes this a "generic" lambda, see generics for more.
Next: Modules