Skip to content

@Unpack[S @ {...}, :Rest @ Spread[S] = Spread[S], :Pos @ Spread[S] = Rest]

A value that implements the (unpack) protocol, destructuring as the items in S without changing the receiver.

A pattern's rest captures the remaining items as a Rest, with the schema of those items in place of S. By default, the rest can only be spread. A *name rest is a Pos instead, which defaults to Rest.

Inherits from: Spread[S]

Methods

(unpack)() -> Unpack[S, Rest: Rest, Pos: Pos]

Returns a value to destructure in place of this one.