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.xml.NodeSeq | |
object RenderExample { | |
object Model { | |
trait Toy | |
case class Bike extends Toy | |
case class Train extends Toy |
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 Generics { | |
import shapeless.HList | |
import shapeless.Nat | |
import shapeless.Nat._ | |
import shapeless._ | |
trait <[A <: Nat, B <: Nat] | |
implicit def lt1[B <: Nat] = new <[_0, Succ[B]] {} | |
implicit def lt2[A <: Nat, B <: Nat](implicit lt: A < B) = new <[Succ[A], Succ[B]] {} |
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 scalaz.effects._ | |
import java.io._ | |
/** | |
* Background reading: | |
* http://www.stackmob.com/2011/12/scalaz-post-part-2/ | |
* http://blog.sigfpe.com/2007/11/io-monad-for-people-who-simply-dont.html |
NewerOlder