Skip to content

Instantly share code, notes, and snippets.

View oxbowlakes's full-sized avatar

Christopher Marshall oxbowlakes

View GitHub Profile
@retronym
retronym / eithert-sequence.scala
Created February 5, 2012 17:51
EitherT sequence
scala> import scalaz._, Scalaz._, effect._
import scalaz._
import Scalaz._
import effect._
scala> val listIoEither = List(EitherT[IO, Int, String](IO(Right("r"))))
listIoEither: List[scalaz.EitherT[scalaz.effect.IO,Int,String]] = List(scalaz.EitherTFunctions$$anon$20@49ab1824)
scala> val ioEitherList = listIoEither.sequenceU
ioEitherList: scalaz.EitherT[scalaz.effect.IO,Int,List[java.lang.String]] = scalaz.EitherTFunctions$$anon$20@5d38a346
@oxbowlakes
oxbowlakes / oxbow.xml
Created June 20, 2011 09:32
IntelliJ IDEA color scheme for Scala/Java
<?xml version="1.0" encoding="UTF-8"?>
<scheme name="oxbow" version="1" parent_scheme="Default">
<option name="LINE_SPACING" value="1.0" />
<option name="EDITOR_FONT_SIZE" value="12" />
<option name="EDITOR_FONT_NAME" value="Consolas" />
<colors />
<attributes>
<option name="ABSTRACT_CLASS_NAME_ATTRIBUTES">
<value>
<option name="FOREGROUND" value="666666" />
@oxbowlakes
oxbowlakes / 3nightclubs.scala
Created May 13, 2011 15:14
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._