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: insertBy
Type: (a -> a -> Ordering) -> a -> [a] -> [a]
Description: similar to insert, but it allows the programmers to supply their own equality test
Related:

Example 1
Program source: 

xxx a b  | a+b < a*b = LT
         | otherwise = GT

Input: insertBy xxx 4 [0,1,3,5,7,9]

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