[mercury-users] false function
Michael Day
mikeday at yeslogic.com
Wed Jul 30 10:39:43 AEST 2003
Hi,
Does it make sense to add a false function to std_util:
:- func false = _ is failure.
For use in semidet functions:
can_fail(X) =
( if X = 1 then
"one"
else if X = 2 then
"two"
else
false
).
Or is this just too confusing?
Michael
--
YesLogic Prince prints XML!
http://yeslogic.com
--------------------------------------------------------------------------
mercury-users mailing list
post: mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the users
mailing list