[m-dev.] feature request -- empty/1 pred in string library

Douglas Auclair dauclair at msn.com
Wed Mar 26 06:21:20 AEDT 2003


Dear all,

I was doing some programming with strings and was surprised to find that the 
string library does not have an empty/1 semideterministic predicate.  This 
would be especially useful in higher-order programming:

Content = filter(isnt(empty), ListOfStrings).

I know an equivalent predicate can be easily constructed:

Empty = (pred(String::in) is semidet :- length(String) = 0),
Content = filter(isnt(Empty), ListOfStrings).

but could the predicate be added to string library, even so?

Sincerely,
Doug Auclair

_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online  
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list