Seems (see this thread) that the culprit for lost performance could be the same_length/2 check instead of foldl. Anyway, I found Paulo’ alternative implementation compelling, and would welcome a move of the much needed functionality of transpose/2 to library(lists), where it belongs… except for backlog compatibility…
CapelliC
2
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| Proposal for an alternative transpose/2 definition | 3 | 1228 | June 30, 2019 | |
| A faster (and safe?) reverse | 6 | 732 | February 5, 2023 | |
| How to change iteration order of results? | 3 | 97 | November 13, 2024 | |
| Six ways to iterate in Prolog | 44 | 14748 | June 15, 2019 | |
| Old habits never die ;-) | 5 | 517 | November 20, 2021 |