[−][src]Macro partial_application::partial
The macro that creates a wrapping closure for a partially applied function
Syntax: partial!(move? fn_name ("=>" | "," | ";") comma_separated_arg_list)
=>
, ,
and ;
are completely equivalent and act only as separator between
function and arguments.
Function arguments are either expressions or _
_
arguments have to be supplied on each call. They forward from the resulting closure into the function.
Expressions are hardcoded into the function call.
partial!(foo => _)
=> |a| foo(a);
partial!(foo => 2)
=> || foo(2);
Prepending move
to the fn_name
creates a move closure. Trailing commas are permitted.