filteWhenFirst f (x:xs) = if f x
                      then x
                      else filteWhenFirst f xs
filteWhenFirst f (x:xs) = if f x
                      then x
                      else filteWhenFirst f xs
filteWhenFirst f (x:xs) = if f x
                      then x
                      else filteWhenFirst f xs