Skip to content

Instantly share code, notes, and snippets.

View svdberg's full-sized avatar

Sander van den Berg svdberg

View GitHub Profile
@svdberg
svdberg / 3nightclubs.scala
Created June 23, 2012 07:12 — forked from oxbowlakes/3nightclubs.scala
A Tale of 3 Nightclubs
/**
* Part Zero : 10:15 Saturday Night
*
* (In which we will see how to let the type system help you handle failure)...
*
* First let's define a domain. (All the following requires scala 2.9.x and scalaz 6.0)
*/
import scalaz._
import Scalaz._
main :: IO ()
main = scotty 3000 app
app :: ScottyM ()
app = do
get "/favicon.ico" $ html "ಠ_ಠ"
get "/:method" $ do
r <- request