A.3 library(apply): Apply predicates on a list
AllApplicationManualNameSummaryHelp

  • Documentation
    • Reference manual
      • The SWI-Prolog library
        • library(apply): Apply predicates on a list
          • include/3
          • exclude/3
          • partition/4
          • partition/5
          • maplist/2
          • maplist/3
          • maplist/4
          • maplist/5
          • convlist/3
          • foldl/4
          • foldl/5
          • foldl/6
          • foldl/7
          • scanl/4
          • scanl/5
          • scanl/6
          • scanl/7
    • Packages
Availability::- use_module(library(apply)).(can be autoloaded)
Sourcefoldl(:Goal, +List, +V0, -V)
foldl(:Goal, +List1, +List2, +V0, -V)
foldl(:Goal, +List1, +List2, +List3, +V0, -V)
foldl(:Goal, +List1, +List2, +List3, +List4, +V0, -V)
Fold a list, using arguments of the list as left argument. The foldl family of predicates is defined by:
foldl(P, [X11,...,X1n], ..., [Xm1,...,Xmn], V0, Vn) :-
      P(X11, ..., Xm1, V0, V1),
      ...
      P(X1n, ..., Xmn, V', Vn).