# \#reduce

**URL:** https://forum.elixirforum.com/tag/reduce/573.md

[Latest](https://forum.elixirforum.com/latest.md) · [Categories](https://forum.elixirforum.com/categories.md) · [Tags](https://forum.elixirforum.com/tags.md)

---

## [Help me rewrite these nested reductions?](https://forum.elixirforum.com/t/help-me-rewrite-these-nested-reductions/57020)

<div class="topic-metadata">

**Author:** [@sodapopcan](https://forum.elixirforum.com/u/sodapopcan)\
**Replies:** 14\
**Last updated:** [July 13, 2023, 8:44am UTC](https://forum.elixirforum.com/t/help-me-rewrite-these-nested-reductions/57020 "2023-07-13T08:44:38Z")

</div>

I have a form with arbitrary levels of deeply nested associations. One particular association that lives a couple of levels down can have an upload associated with it. To track these I need to allow\_upload based on the…

---

## [Explaining map & reduce with animated examples](https://forum.elixirforum.com/t/explaining-map-reduce-with-animated-examples/14010)

<div class="topic-metadata">

**Author:** [@pel\_daniel](https://forum.elixirforum.com/u/pel_daniel)\
**Replies:** 17\
**Last updated:** [January 26, 2023, 4:26am UTC](https://forum.elixirforum.com/t/explaining-map-reduce-with-animated-examples/14010 "2023-01-26T04:26:46Z")

</div>

Hi! I created some animations to explain what happens internally with map & reduce functions. The code is open source. Any feedback is welcome ! https://lambdabricks.github.io/animating-hofs/

---

## [How to extract info from an Enum.reduce function other than a single item](https://forum.elixirforum.com/t/how-to-extract-info-from-an-enum-reduce-function-other-than-a-single-item/45656)

<div class="topic-metadata">

**Author:** [@lc0815](https://forum.elixirforum.com/u/lc0815)\
**Replies:** 13\
**Last updated:** [February 2, 2022, 4:39pm UTC](https://forum.elixirforum.com/t/how-to-extract-info-from-an-enum-reduce-function-other-than-a-single-item/45656 "2022-02-02T16:39:05Z")

</div>

I have a need to extract the individual items from an Enum.reduce function but I get is the single value from the acc. Here is the sample code: defmodule Demo do def add\_sequence\_number(business\_card) do busines…

---

## [Reduce vs reduce by chunks performance](https://forum.elixirforum.com/t/reduce-vs-reduce-by-chunks-performance/42307)

<div class="topic-metadata">

**Author:** [@IhorTsoi](https://forum.elixirforum.com/u/IhorTsoi)\
**Replies:** 7\
**Last updated:** [September 13, 2021, 6:14pm UTC](https://forum.elixirforum.com/t/reduce-vs-reduce-by-chunks-performance/42307 "2021-09-13T18:14:28Z")

</div>

Hi guys! I’ve been learning Elixir for some time now, and recently I’ve noticed something weird while playing with benchee. I was creating different implementations for factorial calculation and measuring their time an…

---

## [Efficient use of \`reduce\`](https://forum.elixirforum.com/t/efficient-use-of-reduce/34362)

<div class="topic-metadata">

**Author:** [@slouchpie](https://forum.elixirforum.com/u/slouchpie)\
**Replies:** 7\
**Last updated:** [September 14, 2020, 3:13pm UTC](https://forum.elixirforum.com/t/efficient-use-of-reduce/34362 "2020-09-14T15:13:10Z")

</div>

Imagine I have a simple list my\_list = \[1, 2, 3\] and I want to “do something” to each element in a reduce loop, removing elements that error/fail while “doing something”. It might look like this: my\_list |\> E…

---

## [Enum.reduce refactor with multi](https://forum.elixirforum.com/t/enum-reduce-refactor-with-multi/22539)

<div class="topic-metadata">

**Author:** [@benonymus](https://forum.elixirforum.com/u/benonymus)\
**Replies:** 4\
**Last updated:** [May 20, 2019, 8:38am UTC](https://forum.elixirforum.com/t/enum-reduce-refactor-with-multi/22539 "2019-05-20T08:38:30Z")

</div>

Hey there, I have this function: defp add\_same\_price(order, ids) do filtered\_order\_book = get\_incomplete\_orders(ids, order.command) same\_price\_orders = filtered\_order\_book |\> Enum.filter(fn x -\> …

---

## [Streaming: VM freezes for large file](https://forum.elixirforum.com/t/streaming-vm-freezes-for-large-file/21594)

<div class="topic-metadata">

**Author:** [@grufino](https://forum.elixirforum.com/u/grufino)\
**Replies:** 3\
**Last updated:** [April 14, 2019, 8:17am UTC](https://forum.elixirforum.com/t/streaming-vm-freezes-for-large-file/21594 "2019-04-14T08:17:38Z")

</div>

Hello! I am building a pipeline to process, aggregate and transform data from csv files, then write back to another csv file… I load rows from a 19 column csv file, and with some mathematical operations (map reduce styl…

---

## [Most efficient way to do transformations, filters and aggregations on large CSV file as data frame](https://forum.elixirforum.com/t/most-efficient-way-to-do-transformations-filters-and-aggregations-on-large-csv-file-as-data-frame/21497)

<div class="topic-metadata">

**Author:** [@grufino](https://forum.elixirforum.com/u/grufino)\
**Replies:** 1\
**Last updated:** [April 8, 2019, 10:51pm UTC](https://forum.elixirforum.com/t/most-efficient-way-to-do-transformations-filters-and-aggregations-on-large-csv-file-as-data-frame/21497 "2019-04-08T22:51:41Z")

</div>

Hi! I am currently porting our old python data pipeline to elixir, and after implementing it more of less the same, I can’t make it run in a “streamable, concurrent” way, so basically when loading one of our biggest csv…

---

## [How to find successor of a key in a map?](https://forum.elixirforum.com/t/how-to-find-successor-of-a-key-in-a-map/17367)

<div class="topic-metadata">

**Author:** [@kunwardeep](https://forum.elixirforum.com/u/kunwardeep)\
**Replies:** 4\
**Last updated:** [October 19, 2018, 12:56pm UTC](https://forum.elixirforum.com/t/how-to-find-successor-of-a-key-in-a-map/17367 "2018-10-19T12:56:51Z")

</div>

My map has key as an integer. I need to find the next greater key than the given key. If the given key is greatest, then return the smallest key.
