Horje

HASKELL implementation - Insertion Sort - Algorithm
Learn
Algorithm - Insertion Sort - Haskell implementation
Haskell Implementation
insertSort :: Ord a => [a] -> [a]
insertSort [] = []
insertSort (x:xs) = insert x (insertSort xs)

insert :: Ord a => a-> [a] -> [a]
insert n [] = [n]
insert n (x:xs) | n <= x    = (n:x:xs)
                | otherwise = x:insert n xs

Read Article
https://develop.horje.com/learn/1434/reference