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
import scala.language.higherKinds | |
import scala.language.implicitConversions | |
import scalaz._ | |
import Scalaz._ | |
import shapeless._ | |
object console { | |
case class ServiceA(name: String) | |
case class ServiceB(name: String, sa: ServiceA) |
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
import scalaz._ | |
import Scalaz._ | |
object console extends App { | |
type ListTOption[A] = ListT[Option, A] | |
val v1: Option[List[\/[String, Int]]] = 1.right[String].point[List].point[Option] | |
val v2: Option[List[\/[String, Int]]] = 2.right[String].point[List].point[Option] |
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
import scala.concurrent.Future | |
import scala.concurrent.Await | |
import scala.concurrent.ExecutionContext.Implicits.global | |
import scala.concurrent.duration._ | |
import scalaz._ | |
import Scalaz._ | |
object Console extends App { | |
val v1: Future[Option[Int]] = 1.point[Option].point[Future] |
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
import scala.concurrent.Future | |
import scala.concurrent.ExecutionContext.Implicits.global | |
import scalaz._ | |
import Scalaz._ | |
object console extends App { | |
val v1: Future[Validation[String, Int]] = 1.success[String].point[Future] | |
val v2: Future[Validation[String, Int]] = 1.success[String].point[Future] |
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
scalaVersion := "2.11.1" | |
resolvers ++= Seq( | |
"Sonatype OSS Releases" at "http://oss.sonatype.org/content/repositories/releases/", | |
"Sonatype OSS Snapshots" at "http://oss.sonatype.org/content/repositories/snapshots/", | |
"Scalaz Bintray Repo" at "http://dl.bintray.com/scalaz/releases" | |
) | |
libraryDependencies ++= Seq( | |
"com.chuusai" %% "shapeless" % "2.0.0", |
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
import scalaz._ | |
import Scalaz._ | |
import shapeless._ | |
import shapeless.record._ | |
import shapeless.ops.record._ | |
import shapeless.syntax.singleton._ | |
object console extends App { |
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
import scala.concurrent.ExecutionContext.Implicits.global | |
import scala.concurrent._ | |
import scala.concurrent.duration._ | |
import scalaz._ | |
import Scalaz._ | |
object console extends App { |
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
import scala.concurrent.ExecutionContext.Implicits.global | |
import scala.concurrent.Future | |
import scalaz._ | |
import Scalaz._ | |
object console extends App { | |
trait Apart[F]{ | |
type T | |
type W[X] |
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
object console extends App { | |
import shapeless._ | |
import syntax.singleton._ | |
import record._ | |
case class Foo(s: String, id: Int) | |
case class Bar(id: Int, b: Boolean) | |
case class Ciao(d: Double) |
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
package console | |
import scalaz._, Scalaz._ | |
object console extends App { | |
def countList[T](l: List[T]): Int = { | |
val i: State[Int, Int] = init[Int] | |
OlderNewer