[mercury-users] Lists of predicates

Michael Day mikeday at corplink.com.au
Thu Jun 7 20:27:09 AEST 2001


If I wish to create a list or map of predicates, the type ends up being
something like list(pred(int, string)) but I always end up with mode
errors as I have not specified the modes of the predicates. Is it possible
to pass lists and maps of predicates or functions around? Is some kind of
inst cast required, or do you just have to define the insts correctly on
the predicates that receive them?

:- pred do_something(int, list(pred(int, string), string).
:- mode do_something(in, in(does something go here?), out) is det.


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