Github: FilterPositionsInList.hs We will now manipulate Lists by filtering through and returning only the elements that occur in the odd positions.
We declare our function type which takes in a List as an argument and returns a List.
type FilterPos = [Int] -> [Int]
Using List Comprehension
f :: FilterPos f lst = [lst!!n | n<-[0..length lst - 1], odd n]
f2 :: FilterPos f2 (_:x:xs) = x : f2 xs f2 _ = 
Using Higher Order Functions (
f3 :: FilterPos f3 = map snd . filter (odd . fst) . zip [0..]