ZVON > References > Haskell reference
| Indexes | Syntax | Prelude | Ratio | Complex | Numeric | Ix | Array | >> List << | Maybe | Char | Monad | IO | Directory | System | Time | Locale | CPUTime | Random

Module: List
Function: insert
Type: Ord a => a -> [a] -> [a]
Description: inserts the first argument before the first element in the list which is greater than the argument
Related:

Example 1

Input: insert 4 [1,3,5,7,9]

Output: [1,3,4,5,7,9]

Example 2

Input: insert 4 [5,3,6,2]

Output: [4,5,3,6,2]