Skip to content

Instantly share code, notes, and snippets.

@t0yv0
Created October 4, 2013 15:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save t0yv0/6827704 to your computer and use it in GitHub Desktop.
Save t0yv0/6827704 to your computer and use it in GitHub Desktop.
type Person =
{
Address : string
Age : int
Name : string
}
let makePerson name age address =
{
Address = address
Age = age
Name = name
}
let personPickler =
Pickler.product makePerson
^+ Pickler.field (fun p -> p.Name) Pickler.string
^+ Pickler.field (fun p -> p.Age) Pickler.int
^. Pickler.field (fun p -> p.Address) Pickler.string
@t0yv0
Copy link
Author

t0yv0 commented Oct 4, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment