Skip to content


Name - Description Default Type
<input> Any input is ignored.
<output> Element popped from the sequence. Any
Name The name of the variable. "" String&Any
Key The key of the value to read/write from/in the table (parameter applicable only if the target variable is or will become a table). None String&String
Global If the variable is or should be available to all of the wires in the same mesh. false Bool

Pops (drops as well as passes as output) the first element of the sequence variable passed in the :Name parameter. Works only on sequences.


PopFront drops (removes) the first element of the sequence variable that has been passed to in the :Name parameter and makes it available to the next shard as its input.

This shard works on both sequences and tables. Parameter :Key applies only to tables.

Since variables may be locally scoped (created with (:Global false); exists only for current wire) or globally scoped (created with (:Global true); exists for all wires of that mesh), both parameters :Global and :Name are used in combination to identify the correct variable to pop elements from.

Input field is ignored and the output of this shard is the element which was popped from the sequence passed to it via the :Name parameter.


;; pop first element from a local sequence
[10 20 30 40] >= .seq                       ;; create a local sequence
(Get .seq) (Log)                            ;; local sequence => [10, 20, 30, 40]
(PopFront :Name .seq) (Log)                 ;; pops the first element as output => 10
(Get .seq) (Log)                            ;; updated sequence => [20, 30, 40]

;; pop first element from a same-name global sequence
[11 21 31 41] >== .seq                      ;; create a same-name global sequence
(Get .seq :Global true) (Log)               ;; local sequence => [11, 21, 31, 41]
(PopFront :Name .seq :Global true) (Log)    ;; pops the first element as output => 11
(Get .seq :Global true) (Log)               ;; updated sequence => [21, 31, 41]
[info] Set - Warning: setting an already exposed variable "seq", use Update to avoid this warning.
[info] [shards/General/PopFront/PopFront.edn] [10, 20, 30, 40]
[info] [shards/General/PopFront/PopFront.edn] 10
[info] [shards/General/PopFront/PopFront.edn] [20, 30, 40]
[info] [shards/General/PopFront/PopFront.edn] [11, 21, 31, 41]
[info] [shards/General/PopFront/PopFront.edn] 11
[info] [shards/General/PopFront/PopFront.edn] [21, 31, 41]