4.75. kink/param/REST_PARAM¶
Provides rest_param data type.
4.75.1. type rest_param¶
A rest_param is a param which consumes an arbitrary number of arguments.
See Vec.op_store for handling of params.
Usually, a rest_param is provided by Varref.rest method.
Example:
[:A :B :R.rest] <- [1 2 3 4 5]
stdout.print_line(R.repr) # => [3 4 5]
4.75.1.1. Rest_param.pass_rest(Rest_args)¶
Rest_param.pass_rest consumes Rest_args as an arbitrary number of arguments.
Precondition:
• Rest_args must be a vec
4.75.2. REST_PARAM.is?(Val)¶
REST_PARAM.is? returns whether the Val is a rest_param.