
22 Feb
2011
22 Feb
'11
6:35 p.m.
What you describe is one of the cases when a partial function is ok (though it's probably better to do something like: giveMeThree x | x == 3 = True | otherwise = error "giveMeThree: not three" It's frequently not possible, but if you can arrange your types so that the invalid values are not possible, even better.) Cheers, Edward