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

Tuple projection

$
0
0

you can indeed define records that compile to arrays in rescript, that’s a nice way to replace tuples with something more ergonomic:

type t = {
  @as("0") foo: int,
  @as("1") bar: string
}

let t = { foo: 13, bar: "bar"}
let bar = t.bar

Viewing all articles
Browse latest Browse all 2592

Trending Articles