Skip to content

uberto/birthdaykata

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

birthdaykata

Birthday Kata in functional style with kotlin

The goal is to try to implement birthday kata using a pure functional style

See Matteo Vaccari explanation here:

http://matteo.vaccari.name/blog/archives/154

and his code:

https://github.com/xpmatteo/birthday-greetings-kata


On purpose I won't use Arrow or other functional libraries

Step 1 - design

I identified the following morphisms: filename -> ReadFile
from a filename I need a Monad to read CsvRow from the file

CsvRow -> Employee
parsing the csv to a data type with all info

Date => (Employee -> Boolean)
from a date I need a filter on Employee born on same date

template => (Employee -> Greeting) from a template string returns the function that create the actual greeting text

Greeting -> Email from greeting text I need a monad to send the emails

About

Birthday Kata in functional style with kotlin

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages