scodec/scodec — pull request #20 by searler (2014-09-11 22:23:14+00:00)
Title: Add combinator that allows validation of data being encoded or decoded

Variant of xmap, where f and g use \/ to report error if argument is unacceptable.

Makes it easy to create new encoders that include validation of the data.