
insert_ordered - inserts elements in an ordered list

Calling sequence:

insert_ordered(expr, list [ , func ])

Parameter:
expr   --  expression
list   --  ordered list
func   --  Boolean function

Summary:

insert_ordered inserts the expression expr in the ascending ordered list
list according to the ordering function func and returns a new list.  The
call func(a,b) must return TRUE if a < b is in accordance with the order of
the list.

If no ordering function is given then the system function _less is used for
the comparison.

The list is not tested to see if it is in ascending order.

>>  insert_ordered(4, [1, 4, 7])

     [1, 4, 4, 7]

See also:  sort

