All Projects → matteobaglini → functional-structures-refactoring-kata

matteobaglini / functional-structures-refactoring-kata

Licence: MIT license
Starting code and proposed solution for Functional Structures Refactoring Kata

Programming Languages

C#
18002 projects
java
68154 projects - #9 most used programming language
kotlin
9241 projects
ruby
36898 projects - #4 most used programming language
F#
602 projects
scala
5932 projects
typescript
32286 projects

Projects that are alternatives of or similar to functional-structures-refactoring-kata

cpsfy
🚀 Tiny goodies for Continuation-Passing-Style functions, fully tested
Stars: ✭ 58 (+87.1%)
Mutual labels:  composition, monad, functor, applicative
Bow
🏹 Bow is a cross-platform library for Typed Functional Programming in Swift
Stars: ✭ 538 (+1635.48%)
Mutual labels:  composition, monad, functor, category-theory
elixir-control
An exploratory look into functors, applicatives, and monads for Elixir
Stars: ✭ 21 (-32.26%)
Mutual labels:  monad, functor, applicative
free-arrow
Implementation of the Free Arrow in Scala and other helpful tools for working with Arrows
Stars: ✭ 14 (-54.84%)
Mutual labels:  monad, category-theory, applicative
Swiftz-Validation
A data structure for validations. It implements the applicative functor interface
Stars: ✭ 15 (-51.61%)
Mutual labels:  functional, functor, applicative
Crocks
A collection of well known Algebraic Data Types for your utter enjoyment.
Stars: ✭ 1,501 (+4741.94%)
Mutual labels:  composition, monad, functor
Language Ext
C# functional language extensions - a base class library for functional programming
Stars: ✭ 3,964 (+12687.1%)
Mutual labels:  monad, functor, applicative
Fp Core.rs
A library for functional programming in Rust
Stars: ✭ 772 (+2390.32%)
Mutual labels:  monad, functor, category-theory
Ltupatternfactory
Lambda the ultimate Pattern Factory: FP, Haskell, Typeclassopedia vs Software Design Patterns
Stars: ✭ 735 (+2270.97%)
Mutual labels:  monad, functor, category-theory
Category Theory
An axiom-free formalization of category theory in Coq for personal study and practical work
Stars: ✭ 562 (+1712.9%)
Mutual labels:  monad, functor, category-theory
Fluokitten
Category theory concepts in Clojure - Functors, Applicatives, Monads, Monoids and more.
Stars: ✭ 408 (+1216.13%)
Mutual labels:  monad, functor, category-theory
kudojs
A utility library to write code in functional programming style in Javascript
Stars: ✭ 22 (-29.03%)
Mutual labels:  composition, functor, applicative
Functional Examples
Examples with Functional JavaScript, following Professor Frisby's course
Stars: ✭ 179 (+477.42%)
Mutual labels:  monad, functor, category-theory
function-composition-cheatsheet
Composition of Functions
Stars: ✭ 24 (-22.58%)
Mutual labels:  composition, monad, functor
Scriptum
A fool's scriptum on functional programming
Stars: ✭ 346 (+1016.13%)
Mutual labels:  composition, monad
php-finder refactoring-kata
🐘🔍Incomprehensible Finder Refactoring Kata port for PHP
Stars: ✭ 22 (-29.03%)
Mutual labels:  kata, refactor
bow-lite
🏹 Bow Lite is a cross-platform library for Typed Functional Programming in Swift
Stars: ✭ 27 (-12.9%)
Mutual labels:  composition, category-theory
Functional Promises
Write code like a story w/ a powerful Fluent (function chaining) API
Stars: ✭ 141 (+354.84%)
Mutual labels:  composition, monad
fnts
λ Minimal Functional Programming Utilities for TypeScript & JavaScript
Stars: ✭ 75 (+141.94%)
Mutual labels:  functional, monad
apropos
Fast strong typed 'Either' data structure for typescript and flow
Stars: ✭ 20 (-35.48%)
Mutual labels:  functional, monad

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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].