Skip to content

Instantly share code, notes, and snippets.

View dpp's full-sized avatar

David Pollak dpp

View GitHub Profile
@dpp
dpp / foo.md
Created July 18, 2012 17:36
Testing how it tastes to eat yaks

Yaks are very tasty because:

  • They taste good
  • They are tender when cooked right
  • They require lots of time to shave

So... let's try some yaks today:

def eatAYak(): String = "Yum Yum"
@dpp
dpp / gist:1284334
Created October 13, 2011 14:24
Sample Parser Combinator shown at Scala Lift Off London 2011 #scalalol
import scala.util.parsing.combinator._
trait RunParser {
this: RegexParsers =>
type RootType
def root: Parser[RootType]
def run(in: String): ParseResult[RootType] = parseAll(root, in)
}
val vars = Map("a" -> 4d, "pi" -> 3.1415d)