# routine repeated

Documentation for routine `repeated`

assembled from the following types:

# class Any

From Any

## (Any) method repeated

Defined as:

method repeated(:, : --> Seq)

Coerces the invocant to a `list`

by applying its `.list`

method and uses `List.repeated`

on it.

say Any.repeated; # OUTPUT: «()»

# class List

From List

## (List) routine repeated

Defined as:

multi sub repeated(*, :, : --> Seq)multi method repeated(List: :, : --> Seq)

Returns a sequence of **repeated** values from the invocant/argument list. It takes the same parameters as `unique`

, but instead of passing through any elements when they're first seen, they're only passed through as soon as they're seen for the second time (or more).

Examples:

say <a a b b b c c>.repeated; # OUTPUT: «(a b b c)»say <a b b c c b a>.repeated; # OUTPUT: «(b c b a)»say <a A B b c b C>.repeated(:as()); # OUTPUT: «(A b b C)»my = %(a => 42), %(b => 13), %(a => 42);say .repeated(:with(&[eqv])) # OUTPUT: «({a => 42})»