This blog post series has moved here.
You might also be interested in the 2016 version.
import concurrent.{ExecutionContext, Future => SFuture, Promise} | |
import util.Try | |
import _root_.scalaz.\/ | |
import _root_.scalaz.concurrent.{Task => ZTask} | |
object Task { | |
def fromScala[A] |
trait ApType { | |
import scala.language.higherKinds | |
type FS[+Z] | |
} | |
trait ApTypeOne[A] extends ApType { | |
type FS[+Z] = A => Z | |
} | |
trait ApTypeMore[A, N <: ApType] extends ApType { | |
type FS[+Z] = A => N#FS[Z] | |
} |
This blog post series has moved here.
You might also be interested in the 2016 version.
// [info] Running p.Run | |
// List(Fish(Bob, Esq.,12), Kitty(Thor, Esq.,java.awt.Color[r=255,g=200,b=0])) | |
import java.awt.Color | |
package p { | |
trait Pet[A] { | |
def name(a: A): String | |
def renamed(a: A, newName: String): A | |
} |
module Main where | |
import Data.Maybe (fromMaybe) | |
import Control.Applicative | |
import Control.Arrow (first) | |
import Control.Monad (ap) | |
import Debug.Trace | |