Quantcast
Channel: ReScript Forum - Latest posts
Viewing all articles
Browse latest Browse all 2592

Record creation with function

$
0
0

You can achieve something similar using an identity function:

type person = { name: string, email: string }

external person: person => person = "%identity"

let myPerson = person({ name: "foo", email: "bla@bla.com" })

Viewing all articles
Browse latest Browse all 2592

Trending Articles