Skip to content

Instantly share code, notes, and snippets.

@jedws
jedws / scalatronFramework.scala
Created May 9, 2012 10:32
a skeleton start to scalatron framework code
// -------------------------------------------------------------------------------------------------
// Framework
// -------------------------------------------------------------------------------------------------
/** Simple typeclass for turning Strings into things */
trait Mapper[A] extends (String => A)
/** define all the Mapper typeclass instances and generators we need */
object Mapper {
implicit val StringMapper = new Mapper[String] {
def apply(s: String) = s