import... | What it imports |
---|---|
cats.std.type |
Typeclass instances for standard library type (think List , Option ) |
cats.syntax.type |
“Enhanced” methods for type (.toRightXor etc) |
cats.data.type |
Imports a type not part of the standard library (think Xor , Kleisli ) and its typeclass instances |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Please comment in case of typos or bugs | |
import scala.slick.driver.H2Driver._ | |
val db = Database.for...(...) | |
case class Record( ... ) | |
class Records(tag: Tag) extends Table[Record](tag,"RECORDS"){ | |
... | |
def * = ... <> (Record.tupled,Record.unapply) | |
// place additional methods here which return values of type Column |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scalacOptions ++= Seq( | |
// "-Xprint:typer", // Turn this on if WartRemover acts up, to see full syntax tree | |
"-deprecation", | |
"-encoding", "UTF-8", // yes, this is 2 args | |
"-feature", | |
"-unchecked", | |
"-Xfatal-warnings", // Treat Warnings as Errors | |
"-Xlint", | |
"-Yno-adapted-args", | |
"-Ywarn-dead-code", // N.B. doesn't work well with the ??? hole |
Copyright © 2016-2018 Fantasyland Institute of Learning. All rights reserved.
A function is a mapping from one set, called a domain, to another set, called the codomain. A function associates every element in the domain with exactly one element in the codomain. In Scala, both domain and codomain are types.
val square : Int => Int = x => x * x