Here, a function f
is defined which accepts only positive integers and returns only negative integers. The special variable $
is used to refer to the return value. Functions in Whiley may not have side-effects (i.e. they are pure functions
).
Function declarations may also have modifiers, such as public
and private
.
NOTE see {@link FunctionOrMethod} for more information.
@see FunctionOrMethod @author David J. Pearce
|
|