prepended

.prepended to:{Iterable<Any>} value:{Dynamic} -> Iterable<Any>

Adds an element at the beginning of a collection. The original collection is not modified.

.var {letters}
- B
- C

.letters::prepended {A} <!-- A, B, C -->

Return

a new collection containing value followed by the elements of the original collection

Parameters

to

collection to add the element to

value

element to add at the beginning of the collection

Chaining

This function is designed to be chained with other function calls:
Iterable<Any>::prepended value:{Dynamic} -> Iterable<Any>