Code Monkey home page Code Monkey logo

functional-programming-is-boring's Introduction

๐Ÿฅš Functional Programming Is Boring ๐Ÿฅš

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.

functional-programming-is-boring's People

Contributors

danieljharvey avatar harrygr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.