mirror of
https://github.com/apple/pkl.git
synced 2026-04-22 16:28:34 +02: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
|
pkl> :load config.pkl
|
||||||
----
|
----
|
||||||
|
|
||||||
To evaluate the `bird.name` property, run:
|
To evaluate the `bird.species` property, run:
|
||||||
|
|
||||||
[source,shell]
|
[source,shell]
|
||||||
----
|
----
|
||||||
pkl> bird.name
|
pkl> bird.species
|
||||||
"Pigeon"
|
"Pigeon"
|
||||||
----
|
----
|
||||||
|
|
||||||
@@ -716,7 +716,7 @@ pkl> hello
|
|||||||
pkl> function double(n) = 2 * n
|
pkl> function double(n) = 2 * n
|
||||||
pkl> double(5)
|
pkl> double(5)
|
||||||
10
|
10
|
||||||
pkl> class Bird { name: String }
|
pkl> class Bird { species: String }
|
||||||
pkl> new Bird { species = "Pigeon" }
|
pkl> new Bird { species = "Pigeon" }
|
||||||
{
|
{
|
||||||
name = ?
|
name = ?
|
||||||
@@ -748,7 +748,7 @@ Due to Pkl's late binding semantics, redefining a member affects dependent membe
|
|||||||
[source,shell]
|
[source,shell]
|
||||||
----
|
----
|
||||||
pkl> name = "Barn"
|
pkl> name = "Barn"
|
||||||
pkl> species = "$name Owl"
|
pkl> species = "\(name) Owl"
|
||||||
pkl> species
|
pkl> species
|
||||||
"Barn Owl"
|
"Barn Owl"
|
||||||
pkl> name = "Elf"
|
pkl> name = "Elf"
|
||||||
|
|||||||
Reference in New Issue
Block a user