This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Extensible Records | |
-- given a record | |
x = { age = 42, name = "Boke" } | |
-- you can clone and remove a field in the process | |
{ x - age } -- { name = "Boke" } | |
-- you can also add a field | |
{ x | species = "Jade Dragon" } -- { age = 42, name = "Boke", species = "Jade Dragon" } |