3.54. kink/param/REST_PARAM

Provides rest_param data type.

3.54.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]

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

3.54.2. REST_PARAM.rest_param?(Val)

REST_PARAM.rest_param? returns whether the Val is a rest_param.