Skip to main content
All lessons

Records

8 min · OCaml

Group related values under named fields — OCaml's struct-like type.

OCaml · Records0/5 cleared

Enemy 1 of 5

A record groups named fields: { name = "Ada"; score = 10 }. Access with dot notation: player.name.

You
Goblin Glitch

Loading editor...

Ln 1, Col 1Spaces: 4
Sign up to fightTarget output: Ada