FP in scala - reading and coding through the book

Table of Content

Welcome

This repo follows loosely along the so-called “redbook”. There is probably nothing new, just personal notes on the exercises. The unspoken goal is to bend some exercises into the more abstract ZIO field which is on my learning list for far too long. We’ll see, if I succeed I’ll write a blog post about it:)

This repo will contain most work from the original repo: https://github.com/fpinscala/fpinscala. This repo is written Scala 2!

CLI Commands

sbt - build tool

Reference: https://www.scala-sbt.org/1.x/docs/Running.html

commandeffect
project <target>switch to <target> f.e. exercises
cleanDeletes all generated files (in target)
compilecompile workspace
testcompiles and run all tests
consolerunning repl; :quit exit
runselect runnable pieces and run them
reloadreload build definiton
help <command>help messages

ammonite - improved REPL

Reference: https://ammonite.io/ Emacs mode: https://github.com/zwild/ammonite-term-repl

emacs commandeffect
ammonite-term-replrun REPL
ammonite-term-repl-send-defunsend defun at point
ammonite-term-repl-send-regionsend region at point
ammonite-term-repl-load-fileload a file to REPL