An open API service indexing awesome lists of open source software.

https://github.com/leolanese/becoming-functional

This is the second part of the Functional Programming introduction, and a more practical approach than theory one.
https://github.com/leolanese/becoming-functional

functional-programming js typescript

Last synced: 21 days ago
JSON representation

This is the second part of the Functional Programming introduction, and a more practical approach than theory one.

Awesome Lists containing this project

README

          

## Becoming functional

"Why bother calculating 𝜋 to 100 places if there's no way anyone can read it? To print it out somewhere, we need to write to a console, or send data to a printer, or something where someone can read it. And, what good is a database if you can’t enter any data into it? We need to read data from input devices, and request information from the network. We can’t do any of it without side effects. And yet, functional programming is built around pure functions. So how do functional programmers manage to get anything done?

> The short answer is, they do what mathematicians do: They cheat." - [James Sinclair](https://jrsinclair.com/)

---
## ACTIONS



Here there is a list of Actions that we can consider to have in mind if we want to get into Functional Programming.

## ADVICE

Open up your minds to the possibility of a world made up solely of "functions" an alternative model of the world.

Please don't rush. Take your time.



Functional programming isn't a specific tool, but a way of writing code. Learning FP sometimes is a bit cryptic and code looks weird in the beginning. Learning Functional Programming takes a while to master it and some other times we need to stop doing what we used to do, moving away from old habits is the hardest part, and try a different way of doing the same thing, pushing ourselves out of the comfortable zone. So, please be patient and open your mind. 



This is the second part of the Functional Programming introduction and a more practical approach than theory one. For the first approach to Functional Programming please have a look at [Functional (Programming) Mindset - An introduction to Functional Programming](https://tech.io/playgrounds/24002/becoming-functional/introduction)


## CONTENT:

| Chapter | Topic
| ------------- |:----------------:|
| ALL LINKS |[ALL LINKS](https://github.com/leolanese/Becoming-Functional/tree/master/markdowns)|
| do better ifs | [do better ifs](https://github.com/leolanese/Becoming-Functional/blob/master/markdowns/do-better-ifs.md)|
| do compose functions | [do compose functions](https://github.com/leolanese/Becoming-Functional/blob/master/markdowns/do-compose.functions.md)|
| do declarative programming | [do declarative programming](https://github.com/leolanese/Becoming-Functional/blob/master/markdowns/do-declarative-programming.md)|
| do follow general suggestions |[do follow general suggestions](https://github.com/leolanese/Becoming-Functional/blob/master/markdowns/do-follow-general-suggestions.md)|
| do no loop statement |[do no loop statement](https://github.com/leolanese/Becoming-Functional/blob/master/markdowns/do-no-loop-statement.md)|
| do not shared state |[do not shared state](https://github.com/leolanese/Becoming-Functional/blob/master/markdowns/do-not-shared-state.md)|
| do not switch case |[do not switch case](https://github.com/leolanese/Becoming-Functional/blob/master/markdowns/do-not-switch-case.md)|
| do avoid use var nor let |[do avoid use var nor let](https://github.com/leolanese/Becoming-Functional/blob/master/markdowns/do-avoid-use-var-nor-let.md)|
| do recursion |[do recursion](https://github.com/leolanese/Becoming-Functional/blob/master/markdowns/do-recursion.md)|
| do remember terminology |[do remember terminology](https://github.com/leolanese/Becoming-Functional/blob/master/markdowns/do-remember-terminology.md)|
| do rest operators |[do rest operators](https://github.com/leolanese/Becoming-Functional/blob/master/markdowns/do-rest-operators.md)|
| do spread operator |[do spread operator](https://github.com/leolanese/Becoming-Functional/blob/master/markdowns/do-spread-operator.md)|
| do use immutable update utility libraries |[do use immutable update utility libraries](https://github.com/leolanese/Becoming-Functional/blob/master/markdowns/do-use-immutable-update-utility-libraries.md)|
| do use memoization |[do use memoization](https://github.com/leolanese/Becoming-Functional/blob/master/markdowns/do-use-memoization.md)
| do avoid using mutating methods |[do-avoid-using-mutating-methods](https://github.com/leolanese/Becoming-Functional/blob/master/markdowns/do-avoid-using-mutating-methods.md)|
| do use readonly keyword |[do use readonly keyword](https://github.com/leolanese/Becoming-Functional/blob/master/markdowns/do-use-readonly-keyword.md)|
|do freeze to avoid mutation | [do freeze to avoid mutation](https://github.com/leolanese/Becoming-Functional/blob/master/markdowns/do-freeze.md)|
|do use type system| [do use Hindley-Milner type](https://github.com/leolanese/Becoming-Functional/blob/master/markdowns/do-type.md)|

---

>OO makes code understandable by encapsulating moving parts. FP makes code understandable by minimizing moving parts.
[Michael Feathers (Twitter)](https://twitter.com/mfeathers/status/29581296216?lang=en)

---

### Further Related links:
#### Why Functional Programming:
[Why functional programming matters](https://hackernoon.com/why-functional-programming-matters-c647f56a7691)

[Why Functional Programming?](https://purelyfunctional.tv/article/why-functional-programming/)

[Advantages of Functional Programming](https://blog.codeship.com/advantages-of-functional-programming/)

[Pros and cons of functional programming](https://itnext.io/pros-and-cons-of-functional-programming-32cdf527e1c2)

[What are the benefits of functional programming?](https://stackoverflow.com/questions/128057/what-are-the-benefits-of-functional-programming/128128#128128)

[Switching from OOP to Functional Programming](https://medium.com/@olxc/switching-from-oop-to-functional-programming-4187698d4d3)

#### SOLID and FP:
[SOLID: the next step is Functional](https://blog.ploeh.dk/2014/03/10/solid-the-next-step-is-functional/)

[Goodbye, Object Oriented Programming](https://medium.com/@cscalfani/goodbye-object-oriented-programming-a59cda4c0e53)

#### BOOKS
[Mostly Adequate Guide to Functional Programming](https://mostly-adequate.gitbooks.io/mostly-adequate-guide/)

[Thinking in Ramda](http://randycoulman.com/blog/categories/thinking-in-ramda/)

[Professor Frisby Introduces Composable Functional JavaScript](https://egghead.io/courses/professor-frisby-introduces-composable-functional-javascript)

[Functors, Applicatives, And Monads In Pictures](http://adit.io/posts/2013-04-17-functors,_applicatives,_and_monads_in_pictures.html)

[Essential Functions Support](https://mostly-adequate.gitbooks.io/mostly-adequate-guide/appendix_a.html)

#### Curry function:
[Curry and Function Composition](https://medium.com/javascript-scene/curry-and-function-composition-2c208d774983)

[Why Curry Helps](https://hughfdjackson.com/javascript/why-curry-helps/)

[Perpetual Currying in JavaScript](https://codeburst.io/perpetual-currying-in-javascript-5ae1c749adc5)

#### Further more documentation:
[Open Source JS Resources](https://github.com/leolanese/Open-Source-JS-Resources)

---
### :100: Thanks!
#### Now, don't be an stranger. Let's stay in touch!

> I'm a passionately curious Front-end Engineer. I like sharing what I know, and learning what I don't. London, UK.

##### :radio_button: linkedin: @LeoLaneseltd
##### :radio_button: Twitter: @LeoLaneseltd
##### :radio_button: Portfolio: www.leolanese.com
##### :radio_button: DEV.to: dev.to/leolanese
##### :radio_button: Blog: leolanese.com/blog
##### :radio_button: Questions / Suggestion / Recommendation: developer@leolanese.com