ZVON > References > Haskell reference |
Intro / Search / ZVON |
| 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: |
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]