Skip to content

estdlib: add lists:mapfoldr/3#2350

Open
pguyot wants to merge 1 commit into
atomvm:release-0.7from
pguyot:w27/estdlib-lists-mapfoldr
Open

estdlib: add lists:mapfoldr/3#2350
pguyot wants to merge 1 commit into
atomvm:release-0.7from
pguyot:w27/estdlib-lists-mapfoldr

Conversation

@pguyot

@pguyot pguyot commented Jul 4, 2026

Copy link
Copy Markdown
Collaborator

lists provided mapfoldl/3 but not its right-to-left counterpart mapfoldr/3. Add it (mirroring OTP semantics: the accumulator visits the list from right to left) so that, among others, Elixir list comprehensions, which translate to lists:mapfoldr/3, can be evaluated on AtomVM.

These changes are made under both the "Apache 2.0" and the "GNU Lesser General
Public License 2.1 or later" license terms (dual license).

SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later

lists provided mapfoldl/3 but not its right-to-left counterpart
mapfoldr/3. Add it (mirroring OTP semantics: the accumulator visits
the list from right to left) so that, among others, Elixir list
comprehensions, which translate to lists:mapfoldr/3, can be evaluated
on AtomVM.

Signed-off-by: Paul Guyot <pguyot@kallisys.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant