Skip to content

Starting code and proposed solution for Functional Structures Refactoring Kata

License

Notifications You must be signed in to change notification settings

matteobaglini/functional-structures-refactoring-kata

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Contributing

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

License

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