I am trying to implement selection sort but I am running into an issue whenever I use my own function minim it crashes even tho that it also returns the same value as the minimum function from prelude.
rmf :: Eq t => t -> [t] -> [t]
rmf _ [] = []
rmf oc (h : t)
| oc == h = t
|otherwise = h : rmf oc t
mymin :: Int -> Int -> Int
mymin a b
| a > b = b
| a < b = a
| a == b = a
minim :: [Int] -> Int
minim [a] = a
minim (h:t) = mymin h (minim t)
seqSort :: (Eq a, Ord a) => [a] -> [a]
seqSort [] = []
seqSort xs = s : seqSort (rmf s xs)
where s = minimum xs
main :: IO ()
main = print(seqSort [