Home

Awesome

Learn Functional Programming course/tutorial on Scala Build Status Build Status

Intro

This course/tutorial was created with purpose to better understand functional programming idioms using Scala language. It covers type classes, monoids, functors, applicatives, monads, traversable/foldable, monad transformers, free monad.
Material is structured as set of stub/unimplemented functions/classes and tests for them. Your objective is to make all unit tests green. It is learn-by-doing course.

Example session

Example session

Inspiration

NICTA course was a great and interesting challenge for me to do in Haskell. I think Scala community will benefit from the similar course.

Target audience

The material in here is quite poor on theoretical/explanation part. I have tried to link material from other authors that I have found to be good into this course Readme to compensate for this. Some prior experience with functional idioms is recommended, but not necessary.

How to start

Just git clone this repository and follow steps in progression section. You can use any IDE and verify your results using sbt test. For me intellij works best - you can easily run individual tests out of it. In case if you got stuck - check answers branch.

Progression

It is important to keep the progression - a lot of things depend on each other. Implementing something = making all tests green for that thing.

Type classes

Monoids

Functors

Monads

Foldable

Applicatives

Traversable

Nested

IO

Monad Transformers

Free monad

Contravariant functor

CoMonads

Bonus

What was left out

Bugs/Issues

In case if find a bug/issue - please report it to https://github.com/dehun/learn-fp/issues or e-mail me on yuriy.netesov@gmail.com
You also are very welcome to create PR.

Credits