This repository contains a refactoring into several files from the original solution published by John De Goes on his youtube video called "FP to the MAX". This video shows how to transform a simple procedural game into a functional program, operating only values and functional effects (random number generation and console input/output).
The interesting thing of this excersice is to show the type classes, type polimorphism, implicits, and the testing capabilities of Scala. For example, the same program code could be run on the Scala console, or tested against a set of sample data, without ANY modifications.
The original video link is the following:
https://www.youtube.com/watch?v=sxudIMiOo68
The description of the video is the following (extracted from the video description):
"What happens when you take a procedural program riddled with partial functions and effects, and incrementally refactor it to a purely functional program—and then dial it up to eleven? In this live coding session, John hopes you'll be amused and a maybe little terrified as he shows you where pure FP leads on one of the simplest programs possible, pointing out both the benefits and the costs of pure functional programming, and giving you an appreciation for how functional programming techniques scale to and deliver the most benefit in very large teams and very large applications."
The original code is included in this repository, but if you want to go to the John's repository in github:
https://gist.github.com/jdegoes/1b43f43e2d1e845201de853815ab3cb9
- My name is Ignacio Gallego Sagastume, software engineer
- If you have suggestions, want to contribute or contact me, my address is : bluemontag@gmail.com