[ create a new paste ] login | about

Link: http://codepad.org/03lsh48s    [ raw code | output | fork ]

johannes - Haskell, pasted on Jan 10:
1
2
3
4
5
6
7
8
9
10
module Main where

import Data.List

insort :: (Ord a) => [a] -> [a]

insort [] = []
insort (x:xs) = insert x $ insort xs

main = do print $ insort [1,5,2,3,7,8,2,5,3,5,3,4,7,6]


Output:
1
[1,2,2,3,3,3,4,5,5,5,6,7,7,8]


Create a new paste based on this one


Comments: