summaryrefslogtreecommitdiff
path: root/H21.hs
blob: c23b31ba49344e16f9053158d01afc9d13ef56ca (plain)
1
2
insertAt :: a -> [a] -> Int -> [a]
insertAt x xs c = let k = c-1 in take k xs ++ x:(drop k xs)