Skip to content

πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’» A coding kata to practice functional design and refactoring. Have fun learning πŸ₯³

License

Notifications You must be signed in to change notification settings

andrej-dyck/kata-functional-gops

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

GOPS -- Pure Functions Kata

GOPS (Game Of Pure Strategy) is a simple bidding game for two players and is played with a standard deck of cards.

Read the rules here: https://playingcarddecks.com/blogs/how-to-play/gops-game-rules.

npm run start -- executes src/index.ts once
npm run start:dev -- executes src/index.ts and re-runs on any file changes

Task

Refactor this solution and maximize the number of pure functions to increase reasoning, testability, and gain many other benefits; like efficiency, reuse, composition, and referential transparency.

What are Pure Functions?

A pure function is a deterministic function (in mathematical terms) without any observable side effects.

In other words, a pure function is a function that depends only on its declared input parameters and its algorithm to produce its output. Further, it does not read, modify or write any values of 'the outside world' (i.e., outside the function's scope).

Here's a good brief video explanation: Codexpanse - Pure Functions

About

πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’» A coding kata to practice functional design and refactoring. Have fun learning πŸ₯³

Topics

Resources

License

Stars

Watchers

Forks