I find it difficult to understand the logic of functional programming. So this should be something pretty simple, but not working for me. What I'm trying to do is: A function with a list of parameters and a list looks something like this: [[1,2,3], [5,7,8,12,34], [2,4,6,8]]
and first I have to delete the values less than 6, and then delete all the lists with less than two elements. My code is as follows:
f11 :: [[Int]] -> [[Int]]
f11 xs = ( filter (\s -> if a <= 6 a then True else False )) (map (filter (\x -> length x <= 2)) xs)
Pelin source
share