FunctionalProgrammingSimplified icon indicating copy to clipboard operation
FunctionalProgrammingSimplified copied to clipboard

Notes and projects for my book, “Functional Programming, Simplified"

Results 35 FunctionalProgrammingSimplified issues
Sort by recently updated
recently updated
newest added

Hi Alvin, on page 119 shouldn't it read _"Pure FP Code is more strict than EOP, FP is a subset (instead of superset) of EOP"_? On page 122 I would...

``` val evenOrOdd = i match { case 1 | 3 | 5 | 7 | 9 => println("odd") case 2 | 4 | 6 | 8 | 10 =>...

This is an example of pass-by-name and you don't cover this until page 255(p239) I worked it out eventually when I got there it suddenly made sense.

On chapter 114 (Type Classes 101: Introduction) I think the code snippet following Option 3a subsection is wrong (seems you copied & pasted from Step 2).

Should it be `batchOfCookies` or `cookies` for the variable name? ```scala test("make a batch of chocolate chip cookies") { val ingredients = List( Flour(3.Cups), Butter(1.Cup), Egg(2), Sugar(1.Cup), ChocolateChip(2.Cups) ) val...

`difficutl` instead of `difficult`

Hi Alvin, Thank you for your work. I would like to ask you if you can add to the README of this repo the references included at https://alvinalexander.com/fpbook. Thanks, Lorenzo

Although not idiomatic, case classes can indeed be constructed using `new`. Subsequently looking for the `new` keyword is not actually a giveaway that the anonymous class used in the example...

**pragprom.com** should be **pragprog.com**.

``` As a fun example of some things you can do with PAFs, the [“partially-applied func- tions” section of the Scala Exercises website](https://www.scala-exercises.org/koans#partiallyappliedfunctions) demonstrates that you can create curried functions...