<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/418-mental-models-for-reduce-functions-cqorfc1mk" -->

---
title: 418: Mental Models For Reduce Functions | daily.dev
description: Joël and Stephanie discuss their mental models for reduce functions, including optimization techniques, the importance of understanding the combining...
canonical: https://daily.dev/posts/418-mental-models-for-reduce-functions-cqorfc1mk
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: 418: Mental Models For Reduce Functions | daily.dev
og:description: Joël and Stephanie discuss their mental models for reduce functions, including optimization techniques, the importance of understanding the combining...
og:url: https://daily.dev/posts/418-mental-models-for-reduce-functions-cqorfc1mk
og:image: https://api.daily.dev/og/posts/CqorFC1MK.png
og:image:alt: 418: Mental Models For Reduce Functions
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# 418: Mental Models For Reduce Functions

**[RUBYLAND](https://daily.dev/sources/rubyla)** · 30 min read · 0 upvotes · 0 comments

## Summary

Joël and Stephanie discuss their mental models for reduce functions, including optimization techniques, the importance of understanding the combining operation, and the use of custom objects as the accumulator. They also touch on the use of each and map instead of reduce, and the concept of monoids in reducing.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://bikeshed.thoughtbot.com/418>

---

Tags: [#functional-programming](https://daily.dev/tags/functional-programming), [#recursion](https://daily.dev/tags/recursion)

[View this post on daily.dev](https://daily.dev/posts/418-mental-models-for-reduce-functions-cqorfc1mk)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"418: Mental Models For Reduce Functions","url":"https://daily.dev/posts/418-mental-models-for-reduce-functions-cqorfc1mk","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/418-mental-models-for-reduce-functions-cqorfc1mk"},"datePublished":"2024-03-12T04:23:35.146Z","dateModified":"2024-05-09T09:28:18.744Z","description":"Joël and Stephanie discuss their mental models for reduce functions, including optimization techniques, the importance of understanding the combining...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/a1758c852da22d3143d147d40a1cfda7?_a=AQAEufR","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/a1758c852da22d3143d147d40a1cfda7?_a=AQAEufR","isAccessibleForFree":true,"articleSection":"RUBYLAND","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"RUBYLAND","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/rubyla","url":"https://daily.dev/sources/rubyla"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/418-mental-models-for-reduce-functions-cqorfc1mk","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"functional-programming,recursion","timeRequired":"PT30M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"RUBYLAND","item":"https://daily.dev/sources/rubyla"},{"@type":"ListItem","position":3,"name":"418: Mental Models For Reduce Functions"}]}
```

