Skip to content

Commit

Permalink
Merge pull request #64 from tarao/doc-unnamed-construction
Browse files Browse the repository at this point in the history
Document for unnamed construction
  • Loading branch information
windymelt authored Jan 31, 2024
2 parents e1969d4 + fa4234e commit 4943e32
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions docs/extensible-records.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,15 @@ Then use `%` as a constructor to instantiate a record.
val person = %(name = "tarao", age = 3)
```

In addition, you can omit field names when they are the same as variable names.

```scala mdoc:mline
val name = "tarao"
val age = 3

%(name, age)
```

Field Access
------------

Expand Down

0 comments on commit 4943e32

Please sign in to comment.