|
| 1 | +<!-- START doctoc generated TOC please keep comment here to allow auto update --> |
| 2 | +<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --> |
| 3 | + |
| 4 | + |
| 5 | + - [Translations](#translations) |
| 6 | +- [What is functional programming](#what-is-functional-programming) |
| 7 | +- [The two pillars of functional programming](#the-two-pillars-of-functional-programming) |
| 8 | + - [Referential transparency](#referential-transparency) |
| 9 | + - [Composition](#composition) |
| 10 | +- [Modelling composition with Semigroups](#modelling-composition-with-semigroups) |
| 11 | + - [Definition of a Magma](#definition-of-a-magma) |
| 12 | + - [Definition of a Semigroup](#definition-of-a-semigroup) |
| 13 | + - [The `concatAll` function](#the-concatall-function) |
| 14 | + - [The dual semigroup](#the-dual-semigroup) |
| 15 | + - [Semigroup product](#semigroup-product) |
| 16 | + - [Finding a Semigroup instance for any type](#finding-a-semigroup-instance-for-any-type) |
| 17 | + - [Order-derivable Semigroups](#order-derivable-semigroups) |
| 18 | +- [Modelling equivalence with `Eq`](#modelling-equivalence-with-eq) |
| 19 | + - [Modeling ordering relations with `Ord`](#modeling-ordering-relations-with-ord) |
| 20 | + - [Dual Ordering](#dual-ordering) |
| 21 | +- [Modeling composition through Monoids](#modeling-composition-through-monoids) |
| 22 | + - [The `concatAll` function](#the-concatall-function-1) |
| 23 | + - [Product monoid](#product-monoid) |
| 24 | +- [Pure and partial functions](#pure-and-partial-functions) |
| 25 | +- [Algebraic Data Types](#algebraic-data-types) |
| 26 | + - [What is an ADT?](#what-is-an-adt) |
| 27 | + - [Product types](#product-types) |
| 28 | + - [Why "product" types?](#why-product-types) |
| 29 | + - [When can I use a product type?](#when-can-i-use-a-product-type) |
| 30 | + - [Sum types](#sum-types) |
| 31 | + - [Constructors](#constructors) |
| 32 | + - [Pattern matching](#pattern-matching) |
| 33 | + - [Why "sum" types?](#why-sum-types) |
| 34 | + - [When should I use a sum type?](#when-should-i-use-a-sum-type) |
| 35 | + - [Functional error handling](#functional-error-handling) |
| 36 | + - [The `Option` type](#the-option-type) |
| 37 | + - [An `Eq` instance](#an-eq-instance) |
| 38 | + - [`Semigroup` and `Monoid` instances](#semigroup-and-monoid-instances) |
| 39 | + - [The `Either` type](#the-either-type) |
| 40 | +- [Category theory](#category-theory) |
| 41 | + - [Definition](#definition) |
| 42 | + - [Part I (Constituents)](#part-i-constituents) |
| 43 | + - [Part II (Composition)](#part-ii-composition) |
| 44 | + - [Modeling programming languages with categories](#modeling-programming-languages-with-categories) |
| 45 | + - [A category for TypeScript](#a-category-for-typescript) |
| 46 | + - [Composition's core problem](#compositions-core-problem) |
| 47 | +- [Functors](#functors) |
| 48 | + - [Functions as programs](#functions-as-programs) |
| 49 | + - [A boundary that leads to functors](#a-boundary-that-leads-to-functors) |
| 50 | + - [Definition](#definition-1) |
| 51 | + - [Functors and functional error handling](#functors-and-functional-error-handling) |
| 52 | + - [Functors compose](#functors-compose) |
| 53 | + - [Contravariant Functors](#contravariant-functors) |
| 54 | + - [Functors in `fp-ts`](#functors-in-fp-ts) |
| 55 | + - [Do functors solve the general problem?](#do-functors-solve-the-general-problem) |
| 56 | +- [Applicative functors](#applicative-functors) |
| 57 | + - [Currying](#currying) |
| 58 | + - [The `ap` operation](#the-ap-operation) |
| 59 | + - [The `of` operation](#the-of-operation) |
| 60 | + - [Applicative functors compose](#applicative-functors-compose) |
| 61 | + - [Do applicative functors solve the general problem?](#do-applicative-functors-solve-the-general-problem) |
| 62 | +- [Monads](#monads) |
| 63 | + - [The problem with nested contexts](#the-problem-with-nested-contexts) |
| 64 | + - [Monad Definition](#monad-definition) |
| 65 | + - [The Kleisli category](#the-kleisli-category) |
| 66 | + - [Defining `chain` step by step](#defining-chain-step-by-step) |
| 67 | + - [Manipulating programs](#manipulating-programs) |
| 68 | + |
| 69 | +<!-- END doctoc generated TOC please keep comment here to allow auto update --> |
| 70 | + |
1 | 71 | This repo introduces functional programming concepts using TypeScript and possibly libraries in the fp-ts ecosystem.
|
2 | 72 |
|
3 | 73 | This fork is an edited translation of [Giulio Canti](https://gcanti.github.io/about.html)'s ["Introduction to Functional Programming (Italian)"](https://github.com/gcanti/functional-programming). The author uses the original as a reference and supporting material for his lectures and workshops on functional programming.
|
4 | 74 |
|
5 | 75 | The purpose of the edits is to expand on the material without changing the concepts nor structure, for more information about the edit's goals see the [CONTRIBUTING](/CONTRIBUTING.md) file.
|
6 | 76 |
|
7 |
| - |
8 | 77 | ## Translations
|
9 | 78 |
|
10 | 79 | - [Simplified Chinese and Japanese](https://github.com/YiCChi/functional-programming) by @YiCChi
|
11 | 80 |
|
12 | 81 |
|
| 82 | + |
13 | 83 | # What is functional programming
|
14 | 84 |
|
15 | 85 | > Functional Programming is programming with pure functions. Mathematical functions.
|
|
0 commit comments