Re: Can you fold over solutions?

Carlo Capelli <[email protected]>
Newsgroups gmane.comp.ai.prolog.swi
Message-ID <CABty9wwAScgWvOcBrpDpXvZLKUk5jauw0N2287FYaEg0Y+2k2Q@mail.gmail.com>
Hi Mark

Maybe some non backtrackable data structure could help: see for instance
nb_rbtrees<http://www.swi-prolog.org/pldoc/doc/home/vnc/prolog/lib/swipl/library/nb_rbtrees.pl>
.
Handle with care !

bye Carlo

2013/8/27 Mark Green <[email protected]>

> Hi,
>
> Is there any predicate which acts like a cross between foreach and foldl?
> In other words, it iterates through all solutions to a goal (like foreach)
> but can carry bindings from one iteration of the iterated predicate to the
> next (like foldl)?
>
> Thanks,
> Mark.
> -------------- next part --------------
> HTML attachment scrubbed and removed
> _______________________________________________
> SWI-Prolog mailing list
> [email protected]
> https://lists.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog
>
-------------- 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.