de class="ml">let validate_whole person =
  if person.name == &quot;Sam&quot; then
    Ok person
  else
    Error &quot;Not Sam&quot;

let validator input =
  let open Validator in
  build build_valid
  |&gt; validate input.email (...)
  |&gt; whole validate_whole</code></pre></dd></dl></div></body></html>