NAME
    insert - insert an element into a list at a given position

SYNOPSIS
    insert(lst, idx, val)

TYPES
    lst		list, &list
    idx		int, &int
    val		any, &any

    return	nil

DESCRIPTION
     Insert the value val into list lst at index idx.

     The index must refer to an element in the list or it must refer
     to the index just beyond the enbd of the list.  That is, idx must
     be in the range [0, size(lst)].

EXAMPLE
    > lst = list(2,3,4)
    > print lst

    list (3 elements, 3 nonzero):
      [[0]] = 2
      [[1]] = 3
      [[2]] = 4

    > insert(lst, 0, 1)
    > print lst

    list (3 elements, 3 nonzero):
      [[0]] = 1
      [[1]] = 2
      [[2]] = 3
      [[3]] = 4

    > insert(lst, 3, "hi")
    > print lst

    list (3 elements, 3 nonzero):
      [[0]] = 1
      [[1]] = 2
      [[2]] = 3
      [[3]] = "hi"
      [[4]] = 4

LIMITS
    0 <= idx <= size(lst)

LIBRARY
    none

SEE ALSO
    append, delete, islist, list, pop, push, remove, rsearch, search, size
