Skip to content

Instantly share code, notes, and snippets.

@globulon
Created May 22, 2012 09:28
Show Gist options
  • Select an option

  • Save globulon/2767817 to your computer and use it in GitHub Desktop.

Select an option

Save globulon/2767817 to your computer and use it in GitHub Desktop.
Unsolvable2
trait SValidation[A] {
def apply(seq: A): DomainValidation[A]
def map[B](f: A => B) = new SValidation[B] {
def apply(seq: B): DomainValidation[B] = null
// self.apply(seq) map { validSequence => validSequence map f }
}
def flatMap[B](f: A => SValidation[B]) = new SValidation[B] {
def apply(seq: B): DomainValidation[B] = null
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment