Making a ternary logic table, and I would like to make my own function for an operator that I\'ll call <=>
.
So, for example, I want to do this, but
Function names with symbols have different syntax than those without:
-- Works:
(<^>) :: Int -> Int -> Int
a <^> b = a + b
-- Doesn't work:
{-
<^> :: Int -> Int -> Int
<^> a b = a + b
-}
-- Works:
letters :: Int -> Int -> Int
letters a b = a + b
-- Doesn't work:
{-
(letters) :: Int -> Int -> Int
a letters b = a + b
-}
I promise, though - Haskell is well worth learning the complex rules.