ceylon.language.Callable.ceylon Maven / Gradle / Ivy
"A reference to a function. The type arguments encode the
[[return type|Return]] of the function along with its
[[parameter types|Arguments]]. The parameter types are
represented by a tuple type. Functions declared `void` are
considered to have the return type `Anything`.
For example, the type of the anonymous function
`(Float x, Integer y) => x^y+1` is:
Callable
which we usually abbreviate to `Float(Float,Integer)`.
Likewise, the type of the function reference `plus`
to the function [[plus]] is:
Callable
which we abbreviate as `Float(Float,Float)`.
A variadic function is represented using an unterminated
tuple type. For example, the type of the function reference
`concatenate
© 2015 - 2024 Weber Informatics LLC | Privacy Policy