Awesome Open Source
Awesome Open Source

Functional Structures Refactoring Kata

This refactoring kata aims to let you practice with one of the main functional programming building block: Functional Structures.

The starting code (provided in different languages) implements a use case with an imperative approach. Your mission is to remove every effects (aka computational context) within the applyDiscount function with the power of Functional Structures.

How to use this Kata

The simplest way is to just clone the code and start hacking right away improving the design. The project includes some tests useful to make sure you don't break the code while you refactor.

Proposed Solution

You can take a look at my refactored code (in Scala) wich you will find inside one of the solution-* branchs.

Learning Materials


Is your favorite language missing? Want to contribute? Awesome! Feel free to submit an Issue or a Pull Request.


This project is licensed under the terms of the MIT license.

Alternatives To Functional Structures Refactoring Kata
Select To Compare

Alternative Project Comparisons
Related Awesome Lists
Top Programming Languages
Top Projects

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
C Sharp (164,057
Scala (28,663
Functional Programming (10,968
Structure (10,169
Refactoring (2,073
Kata (2,000
Monad (1,929
Functor (546
Applicative (372
Category Theory (263
Refactor (66
Deliberate Practice (12