---
title: "Discussion on \"Folds in TypeScript\" | Hashnode"
description: "Discussion on \"Folds in TypeScript\". For past few days, folds were stuck in my head for some reason and needed some unfolding 😃. I did so and below is the summary of my understanding for the benefit of my future self.\nWhy\nConsider the scenario where we have an array of numbers and we w..."
url: "https://hashnode.com/posts/folds-in-typescript/620262a1457dec06830c7d0c"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Folds in TypeScript](https://blog.omkarpatil.dev/folds-in-typescript?utm_source=hashnode&utm_medium=feed)

For past few days, folds were stuck in my head for some reason and needed some unfolding 😃. I did so and below is the summary of my understanding for the benefit of my future self. Why Consider the scenario where we have an array of numbers and we w...

Feb 8, 2022 · 10 min read · blog.omkarpatil.dev  
Updated Aug 26, 2022  
Read the article

-   [#typescript](https://hashnode.com/tag/typescript)
-   [#javascript](https://hashnode.com/tag/javascript)
-   [#functional-programming](https://hashnode.com/tag/functional-programming)

## Written by

[Omkar Patil](https://hashnode.com/@omkarpatil)

@omkarpatil · Ottawa, Canada

  
[View profile](https://hashnode.com/@omkarpatil)

Software Architect

Generalizing Specialist - that's just hyperbole for "jack of all, master of some". Dev for 20+ years with curiosity still intact.

## Responses 1

Markdown supported · ⌘↵ to post

[Berend](https://hashnode.com/@Loerpert)

[Feb 8, 2022](https://hashnode.com/posts/folds-in-typescript/620262a1457dec06830c7d0c/comment/62026c58b6c216065a359511)

Very nice article. It might help to make the types, generics and arguments a bit more meningful in this example just for explanations sake. So instead of B, using Accumulator for instance. Thanks for this :)
