Advertisement
Guest User

Untitled

a guest
Jun 13th, 2014
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
F# 0.23 KB | None | 0 0
  1. type Request = {name:string; email:string}
  2.  
  3. let validateInput input =
  4.    if input.name = "" then Failure "Name must not be blank"
  5.    else if input.email = "" then Failure "Email must not be blank"
  6.    else Success input  // happy path
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement