S.PipelinePipeline decoders present an alternative to the mapN style. They read more naturally, but can lead to harder-to-understand type errors.
let person_decoder : person decoder =
decode as_person
|> required "name" string
|> required "age" intval decode : 'a -> 'a decoder