PrependTo
| Name |
Mandatory |
Description |
Default |
Type |
⬅️ Input |
|
The value to prepend to the collection. |
|
Any |
Output ➡️ |
|
The input to this shard is passed through as its output. |
|
Any |
Collection |
No |
The collection to add the input to. |
none |
Var([Any])Var(String)Var(Bytes) |
Prepends the input to the context variable passed to Collection.
Examples
| ;; prepend element to sequence
[1 2 3] >= seq
0 | PrependTo(seq) ;; prepends element to sequence
seq (Log) ;; updated sequence => [0, 1, 2, 3]
;; prepend character to string
"pen" >= str
"O" | PrependTo(str) ;; prepends character to string
str (Log) ;; updated string => Open
|