fp-starter-pack.g8
fp-starter-pack.g8 copied to clipboard
Starter pack for functional programming in Scala with common pure fp libraries and the Ammonite REPL
fp starter pack
Giter8 template to get up and running with Cats, Zio, Fs2
As a bonus includes Li Haoyi's Ammonite REPL embedded into the test module so you can use Test/run to play with FP on the command line
g8 justinhj/fp-starter-pack.g8
or to use directly from sbt you can use:
sbt new justinhj/fp-starter-pack.g8
Reply to the questions to set each variable; the only one you have to change is the project name.
Instructions
Install sbt
Create the project as above
You can start writing code in src/main/scala/YOU/YOURPROJECT/YourProject.scala
You can access an Ammonite REPL (Ammonite greatly improves the Scala REPL) by runnning the following at the sbt prompt:
Test/run
Main libraries included
- Cats - Lighweight modular fp library (type classes and data types)
- ZIO - Typesafe composable async and concurrent programming
- Fs2 - pure functional streams
- Shapeless - Generic programming
What about Scalaz
Use the Scalaz branch to replace Cats with Scalaz
sbt new justinhj/fp-starter-pack.g8 --branch scalaz
Origin
This is a fork of bneil/finch-skeleton.g8
I used that excellent example of a g8 template and modified for my own ends by updating Scala, sbt, adding and removing libraries and plugins