Functional Programming Is Boring Save

A short course on Functional Programming in Typescript

Project README

:egg: Functional Programming Is Boring :egg:

A completely OK short course on FP for Bulb Engineers.

Click on the words for information about subjects and things.

Intro

Part 1

Lesson 1 - Option

Information | Exercises

Lesson 2 - Either

Information | Exercises

Lesson 3 - Optics

Information | Exercises

Lesson 4 - TaskEither

Information | Exercises

Lesson 5 - Parsers

Information | Exercises

Lesson 6 - Validation

Information | Exercises

Exercises

If you'd like to practise using fp-ts in the wild, here are some exercises along with unit tests that you can use to increase your 10x-ing.

The tests for each unit are currently skipped, but can be enabled by removing skip from the matching test file.

Datatypes

These exercises are for specific types that you will find in fp-ts.

Control flow types

Option | Either

Stateful types

State | Writer

Typeclasses

After we've used a few datatypes we'll start to notice the same old functions (such as map) coming up over and over. These interfaces, reused between many types, are called typeclasses, these exercises are to help gain a better intuition for them by implementing their functions yourself.

Exercises

Functor | Monoid

Examples

Some more concrete examples of FP in the wild (please feel free to contribute here if you find something worth sharing)

Option | Either | io-ts validator | Store Comonad | Parser | newtypes | dependency injection with Reader

Installing stuff

The exercises are in Typescript and be run as such:

yarn install

# tests
yarn test:watch

# typechecker
yarn typescript:watch

The tests for each exercise live in src/tests, and are all skipped, enable the ones you want to try.

Open Source Agenda is not affiliated with "Functional Programming Is Boring" Project. README Source: danieljharvey/functional-programming-is-boring

Open Source Agenda Badge

Open Source Agenda Rating