<div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial"><div>Hi, everyone,<br><br>Is it possible to make combine the following "f" and "g" into one function?<br>f:: a -> b -> b  <br>f x y = y        <br>g:: a -> a -> a  <br>g x y = x        <br><br>Or similarly, "eq1" and "eq2" into one function?<br>eq1 :: (Eq a)=>a->a->Bool      <br>eq1 = (==)                     <br>eq2 :: (Eq a,Eq b)=>a->b->Bool <br>eq2 _ _ = False                <br><br>Looks like it would require some typeclasses, but at least in the first case, "a" and "b" should be any types.<br><br>Best!<br></div></div>