Created
January 11, 2012 13:03
-
-
Save machisuji/1594563 to your computer and use it in GitHub Desktop.
A SequenceReader should enable reading sequences of elements who are readable themselves.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| implicit def seqReader[Seq[T], T](implicit reader: TwpReadable[T]): TwpReadable[Seq[T]] = | |
| new SequenceReader[Seq[T], T] { | |
| def map(in: Input) = reader read in | |
| def canMap(in: Input) = reader.isDefinedAt(in) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment