Just a simple question that i cannot solve I was trying to get maybe_divide by the following code as assignment required, however terminal give me an error message
test2.hs:1:112: Parse error in pattern: (Just x)
maybe_devide :: Maybe Float -> Maybe Float -> Maybe Float
maybe_devide maybeX maybeY = case maybeX maybeY of
(Just x) (Just y)
|x/=0 && y/=0 -> Just (div x y)
|x=0 && y/=0 -> Just 0
|x/=0 && y=0 -> Nothing
Nothing (Just y) -> Nothing
(Just x) Nothing -> Nothing
Who likes to tell me what is wrong with it? Thanks