This repository gives code samples illustrating how to refactor a small program using functional principles and the Ramda JavaScript library.
Clone this repo and install dependencies.
git clone https://github.com/mwrather/poker-classifier-fp.git
cd poker-classifier-fp
npm install
Checkout
git checkout start # the bare repo with no tests
git checkout conventional # pass tests with a conventional approach
git checkout fp # refactor using ramda
As you experiment with different implementations, use the tests to check your work:
npm run test # test the implementation once
npm run test:watch # re-run tests on file save