Answers for "haskell guards"

1

Haskell guards inside guards

f x | predicate1 =
         case () of                                -- () can only evaluate to ()
           () | predicate2 -> a
              | otherwise  -> b
    | otherwise  = c
Posted by: Guest on October-15-2021
0

haskell guards

f x | predicate1 = expression1 | predicate2 = expression2 | predicate3 = expression3
Posted by: Guest on December-29-2020

Browse Popular Code Answers by Language