Skip to content

Instantly share code, notes, and snippets.

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

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

Select an option

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