Sometimes I write code like this
solveLogic :: Int -> Int -> Int
solveLogic a b =
let
x = 1
brainiac
| a >= x = 1
| a == b = 333
| otherwise = 5
in
brainiac
And every time I have urge to write this things without unneeded "brainiac" function, like this:
solveLogic :: Int -> Int -> Int
solveLogic a b =
let
x = 1
in
| a >= x = 1
| a == b = 333
| otherwise = 5
Which code is much more "Haskellish". Is there any way of doing this?