mirror of
https://github.com/apple/pkl.git
synced 2026-03-13 05:35:21 +01:00
update 'Loading Modules' example to match config contents (#84)
Co-authored-by: Daniel Chao <dan.chao@apple.com>
This commit is contained in:
@@ -650,11 +650,11 @@ To load <<config.pkl,`config.pkl`>> into the REPL, run:
|
||||
pkl> :load config.pkl
|
||||
----
|
||||
|
||||
To evaluate the `bird.name` property, run:
|
||||
To evaluate the `bird.species` property, run:
|
||||
|
||||
[source,shell]
|
||||
----
|
||||
pkl> bird.name
|
||||
pkl> bird.species
|
||||
"Pigeon"
|
||||
----
|
||||
|
||||
@@ -716,7 +716,7 @@ pkl> hello
|
||||
pkl> function double(n) = 2 * n
|
||||
pkl> double(5)
|
||||
10
|
||||
pkl> class Bird { name: String }
|
||||
pkl> class Bird { species: String }
|
||||
pkl> new Bird { species = "Pigeon" }
|
||||
{
|
||||
name = ?
|
||||
@@ -748,7 +748,7 @@ Due to Pkl's late binding semantics, redefining a member affects dependent membe
|
||||
[source,shell]
|
||||
----
|
||||
pkl> name = "Barn"
|
||||
pkl> species = "$name Owl"
|
||||
pkl> species = "\(name) Owl"
|
||||
pkl> species
|
||||
"Barn Owl"
|
||||
pkl> name = "Elf"
|
||||
|
||||
Reference in New Issue
Block a user