listAppend (Function)

Signature: listAppend(list: List<t0>, value: t0) -> List<t0>

Description: Returns a new list with value at the end. Amortized O(1).

Parameters

  • list (List): The list
  • value (t0): Value to append

Returns: List

Example

listAppend([1, 2], 3)  // [1, 2, 3]
listAppend ([1, 2], 3)  // [1, 2, 3]