"maplist" for DCG?

Alan Baljeu <[email protected]>
Newsgroups gmane.comp.ai.prolog.swi
Message-ID <[email protected]>
maplist(F, In, Out) is one thing, but how do you do the equivalent with a DCG, so the effect is something//2
something(f, [In1, In2, In3]) 
is equivalent to 
f(In1), f(In2), f(In3)

where f/1 might be:
f(X) --> { code(X,Y)}, [Y].

In other words each input gets processed and appended to the DCG list.  I feel like there's probably a standard predicate for this.


Alan Baljeu
-------------- next part --------------
HTML attachment scrubbed and removed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.