# \#foldl

**URL:** https://swi-prolog.discourse.group/tag/foldl/140.md

[Latest](https://swi-prolog.discourse.group/latest.md) · [Categories](https://swi-prolog.discourse.group/categories.md) · [Tags](https://swi-prolog.discourse.group/tags.md)

---

## [Fold over answers](https://swi-prolog.discourse.group/t/fold-over-answers/8697)

<div class="topic-metadata">

**Author:** [@Boris](https://swi-prolog.discourse.group/u/Boris)\
**Replies:** 8\
**Last updated:** [December 30, 2024, 6:58am UTC](https://swi-prolog.discourse.group/t/fold-over-answers/8697 "2024-12-30T06:58:59Z")

</div>

I think I missed the real question by @emiruz. The foldl at the end of their question: in library(aggregate) there are templates, but you cannot provide your own aggregation operation. I think @j4n\_bur53 showed something…

---

## [Foldnum for integer intervals like foldl for lists](https://swi-prolog.discourse.group/t/foldnum-for-integer-intervals-like-foldl-for-lists/5975)

<div class="topic-metadata">

**Author:** [@kuniaki.mukai](https://swi-prolog.discourse.group/u/kuniaki.mukai)\
**Replies:** 2\
**Last updated:** [November 29, 2022, 6:55pm UTC](https://swi-prolog.discourse.group/t/foldnum-for-integer-intervals-like-foldl-for-lists/5975 "2022-11-29T18:55:34Z")

</div>

foldnum is a macro included in my pack package pac about ten years ago. I have fixed a bug of foldnum macro expansion related to global variable. foldnum is a version of foldl for integer interval in stead of lists. I…
