3 Nov
2006
3 Nov
'06
11:45 p.m.
Hello Dan, Saturday, November 4, 2006, 12:56:31 AM, you wrote:
1) I don't understand what I'm doing 2) GHC is inferring different types for pointed and point-free function definition.
this is because of famous monomorphism restriction just two days ago i've published in haskell-cafe code that do that you want and mich more. for example: print (True &&& 1 ||| 0) -- prints 1 print ("" &&& "Yes" ||| "No") -- prints "No", empty line considered as false condition print (0 &&& "Non-zero" ||| "Zero") -- integer values treated in C style -- Best regards, Bulat mailto:Bulat.Ziganshin@gmail.com