Haskell where语句在输入'='上返回解析错误

时间:2016-04-11 00:07:15

标签: haskell

我做的这个函数返回parse error on input ‘=’

checkappend :: Maybe [a] -> Maybe [a] -> (a -> Bool) -> Maybe [a]
checkappend ml1 ml2 test =
    if all test l1
    then (Just (l1 ++ l2))
    else Nothing
    where l1 = fromJust(ml1)
        l2 = fromJust(ml2)

0 个答案:

没有答案