Sometimes I write code like this
solveLogic :: Int -> Int -> Int solveLogic a b = let x = 1 brainiac | a >= x = 1
When I want guards as an expression I use this somewhat ugly hack
case () of _ | a >= x -> 1 | a == b -> 333 | otherwise -> 5
Yes, using a where clause:
where
solveLogic a b | a >= x = 1 | a == b = 333 | otherwise = 5 where x = 1