Can 'all' be applied to a list of Maybe?

Viewed 1452

Is it possible to use all on a [Maybe Int] list?

I know all (< 9) [2,4,6,8,10] returns False, but that is using a list with just integers.

I am trying to accomplish something similar except with a list that looks like this:
[Just 3, Just 6, Nothing, Nothing, Just 7]

I want all (<=9) [Just 3, Just 6, Nothing, Nothing, Just 7] to return True

3 Answers
Related