Module Function.Placeholder

Description

Placeholder arguments for Function.bind


Constant arg0
Constant arg1
Constant arg2
Constant arg3
Constant arg4
Constant arg5
Constant arg6
Constant arg7
Constant arg8
Constant arg9

constant Function.Placeholder.arg0
constant Function.Placeholder.arg1
constant Function.Placeholder.arg2
constant Function.Placeholder.arg3
constant Function.Placeholder.arg4
constant Function.Placeholder.arg5
constant Function.Placeholder.arg6
constant Function.Placeholder.arg7
constant Function.Placeholder.arg8
constant Function.Placeholder.arg9

Description

arg<n> will return an instance of Arg that returns the n:th arg. For convenience for c++11 developers _0, _1 etc also works.

Note that arg0 is the first argument, not arg1


Variable rest

Arg Function.Placeholder.rest

Description

Return all arguments not used by any Arg or Splice.

Unlike Splice this will return non-continous unused arguments.

Example

This creates a version of call_out that has the function argument as the last argument

import Function.Placeholder;
 Function.bind( call_out, Arg(-1), rest)