Code Review for cleaning csv file

Hello, I am a new bee in haskell.

can someone explain to me what is the meaning of this line?

removable :: [Int] -> [Int]
removable xs = cv ls 1
where
ls = sort . fout (-1) $ xs
cv l@(c:cs) n
| c == n = cv cs (n+1)
| otherwise = l
cv [] n = []

I am trying to clean up a csv file

It first calls the unknown function fout on the input with parameter -1, then it sorts the resulting list and finally the cv function removes the prefix that is ascending contiguously starting from 1, like 1, 2, 3, etc.

Do you have specific parts that you don’t understand?

3 Likes