mirror of
https://codeberg.org/ProgramSnail/lang_2023.git
synced 2025-12-05 22:48:42 +00:00
18 lines
475 B
Text
18 lines
475 B
Text
namespace \employee {
|
|
decl gen-employee : \unit -> \employee
|
|
def gen-employee = {
|
|
var x = $@complex & 11.3 & 15.87 // construct on heap
|
|
return
|
|
$employee // construct on stack
|
|
& name = "John"
|
|
& role =
|
|
($manager
|
|
& "John"
|
|
& productivity =
|
|
($productivity.high
|
|
& duration = 10.3
|
|
& sleep-on-work = ($productivity.sleep-on-work.no))
|
|
& salary = 123)
|
|
|
|
}
|
|
}
|