For the semantics of the parameter ARRY see Conventions of the arrays API.
mbfl_array_insert_value_bang to insert values in a random position.
mbfl_array_remove to remove values in a random position.
Store VALUE in the leftmost slot of ARRY; this function mutates ARRY itself.
{ mbfl_declare_index_array_varref(ARRY, ()) mbfl_array_push_front _(ARRY) '99' mbfl_slots_qvalues(ARRY) } ⇒ 99 { mbfl_declare_index_array_varref(ARRY, (A)) mbfl_array_push_front _(ARRY) '99' mbfl_slots_qvalues(ARRY) } ⇒ 99 A { mbfl_declare_index_array_varref(ARRY, (a b c d e f g h i)) mbfl_array_push_front _(ARRY) '99' mbfl_slots_qvalues(ARRY) } ⇒ 99 a b c d e f g h i
Store VALUE in the rightmost slot of ARRY; this function mutates ARRY itself.
{ mbfl_declare_index_array_varref(ARRY, ()) mbfl_array_push_back _(ARRY) '99' mbfl_slots_qvalues(ARRY) } ⇒ 99 { mbfl_declare_index_array_varref(ARRY, (A)) mbfl_array_push_back _(ARRY) '99' mbfl_slots_qvalues(ARRY) } ⇒ A 99 { mbfl_declare_index_array_varref(ARRY, (a b c d e f g h i)) mbfl_array_push_back _(ARRY) '99' mbfl_slots_qvalues(ARRY) } ⇒ a b c d e f g h i 99
Store in the variable VALUE_RV the leftmost value ARRY, then remove that slot from the array; this function mutates ARRY itself. If the array is empty: the behaviour of this function is undefined.
{ mbfl_declare_index_array_varref(ARRY, (a b c d e)) mbfl_declare_varref(VALUE) mbfl_array_pop_front_var _(VALUE) _(ARRY) "$VALUE" ⇒ a mbfl_slots_qvalues(ARRY) ⇒ b c d e } { mbfl_declare_index_array_varref(ARRY, ()) mbfl_declare_varref(VALUE) mbfl_array_pop_front_var _(VALUE) _(ARRY) "$VALUE" ⇒ a mbfl_slots_qvalues(ARRY) ⇒ }
Store in the variable VALUE_RV the rightmost value ARRY, then remove that slot from the array; this function mutates ARRY itself. If the array is empty: the behaviour of this function is undefined.
{ mbfl_declare_index_array_varref(ARRY, (a b c d e)) mbfl_declare_varref(VALUE) mbfl_array_pop_back_var _(VALUE) _(ARRY) "$VALUE" ⇒ e mbfl_slots_qvalues(ARRY) ⇒ a b c d } { mbfl_declare_index_array_varref(ARRY, ()) mbfl_declare_varref(VALUE) mbfl_array_pop_back_var _(VALUE) _(ARRY) "$VALUE" ⇒ a mbfl_slots_qvalues(ARRY) ⇒ }
Store in the variable VALUE_RV the leftmost value ARRY. If the array is empty: the behaviour of this function is undefined.
{ mbfl_declare_index_array_varref(ARRY, (a b c d e)) mbfl_declare_varref(VALUE) mbfl_array_front_var _(VALUE) _(ARRY) "$VALUE" ⇒ a }
Store in the variable VALUE_RV the rightmost value ARRY. If the array is empty: the behaviour of this function is undefined.
{ mbfl_declare_index_array_varref(ARRY, (a b c d e)) mbfl_declare_varref(VALUE) mbfl_array_back_var _(VALUE) _(ARRY) "$VALUE" ⇒ e }
Remove the leftmost slot from the array; this function mutates ARRY itself. If the array is empty: the behaviour of this function is undefined.
{ mbfl_declare_index_array_varref(ARRY, (a b c d e)) mbfl_array_pop_front _(VALUE) _(ARRY) mbfl_slots_qvalues(ARRY) ⇒ b c d e } { mbfl_declare_index_array_varref(ARRY, ()) mbfl_array_pop_front _(VALUE) _(ARRY) mbfl_slots_qvalues(ARRY) ⇒ }
Remove the rightmost slot from the array; this function mutates ARRY itself. If the array is empty: the behaviour of this function is undefined.
{ mbfl_declare_index_array_varref(ARRY, (a b c d e)) mbfl_array_pop_back _(VALUE) _(ARRY) mbfl_slots_qvalues(ARRY) ⇒ a b c d } { mbfl_declare_index_array_varref(ARRY, ()) mbfl_array_pop_back _(VALUE) _(ARRY) mbfl_slots_qvalues(ARRY) ⇒ }
This document describes version 3.0.0-devel.9 of Marcos Bash Functions Library.