# Proposal: mapRight

**URL:** <https://es.discourse.group/t/proposal-mapright/2318>\
**Category:** 🦋 Proposals\
**Tags:** proposal\
**Created:** [March 5, 2025, 7:41am UTC](https://es.discourse.group/t/proposal-mapright/2318 "2025-03-05T07:41:04Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![bergus](https://yyz2.discourse-cdn.com/free1/user_avatar/es.discourse.group/bergus/32/152_2.png) [@bergus](https://es.discourse.group/u/bergus)\
**Post date:** [March 6, 2025, 11:24pm UTC](https://es.discourse.group/t/proposal-mapright/2318/7 "2025-03-06T23:24:51Z")

</div>

> [@Poornakumar](#):
>
> `mapRight`, an array method that processes elements from right to left

Tbh I would have expected a such-named method to still return the results in the normal order, and just to process the elements in the reverse order (from the right). But that's generally a bit pointless, as `map` is expected to be order-independent (sans exceptions, maybe).

I think your use case should rather be solved using reverse iteration, see [Use Cases · Issue #1 · tc39/proposal-reverseIterator · GitHub](https://github.com/tc39/proposal-reverseIterator/issues/1) / [GitHub - leebyron/ecmascript-reverse-iterable: ReverseIterable Interface Spec Proposal](https://github.com/leebyron/ecmascript-reverse-iterable) / [Array.prototype.reversed() (+Map, Set)](https://es.discourse.group/t/array-prototype-reversed-map-set/556). These would allow you to write something like

```js
const arr = [1, 2, 3, 4, 5];
const result = arr.reversedValues().map(x => x + 1).toArray(); // [6,5,4,3,2]
// or
const result = arr.values().reverse().map(x => x + 1).toArray(); // [6,5,4,3,2]

```

which is much easier to understand imo, using the familiar term "reverse(d)" instead of "right".

---

_[View the full topic](https://es.discourse.group/t/proposal-mapright/2318)._
