You defined “a” as a record so what you would need is: let arr = [{x: 1, y: 2}, {x: 3, y: 4}, {x: 5, y: 6}, {x: 7, y: 8}]
The type annotation for arr would be array<a>
Pass it a function which takes the individual element arrays and returns a value of the record type a.
Btw, let arr = [ [1,2], [3,4, ... ] to create an array of pairs is not really the correct way in ReScript. It’s more of a JavaScript/TypeScript idiom. In ReScript you would use tuples: let arr = [(1, 2), (3, 4), ...]. Tuples have a fixed length so you can ensure that all the elements are pairs.