ans a@(h:_) = fromJust $ head $ filter (/= Nothing ) $ map (\n -> f n 0 a) $ reverse [1..h]
ans a@(h:_) = fromJust $ head $ filter (/= Nothing ) $ map (\n -> f n 0 a) $ reverse [1..h]
ans a@(h:_) = fromJust $ head $ filter (/= Nothing ) $ map (\n -> f n 0 a) $ reverse [1..h]