File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,11 +7,11 @@ or `nil`.
77``` Lua
88local folder = scope :New " Folder" {
99 [Children ] = {
10- New " Part" {
10+ scope : New " Part" {
1111 Name = " Gregory" ,
1212 Color = Color3 .new (1 , 0 , 0 )
1313 },
14- New " Part" {
14+ scope : New " Part" {
1515 Name = " Sammy" ,
1616 Material = " Glass"
1717 }
@@ -123,7 +123,7 @@ local folder = scope:New "Folder" {
123123 -- state object containing children (or nil)
124124 scope :Computed (function (use )
125125 return if use (includeModel )
126- then modelChildren : GetChildren () -- array of children
126+ then modelChildren -- array of children
127127 else nil
128128 end )
129129 }
@@ -152,7 +152,7 @@ local folder = scope:New "Folder" {
152152 },
153153 scope:Computed(function(use)
154154 return if use(includeModel)
155- then modelChildren:GetChildren() -- array of children
155+ then modelChildren -- array of children
156156 else nil
157157 end)
158158 }
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ local foodSet = scope:Value({})
5151
5252local prefixes = { pie = " tasty" , chocolate = " yummy" , broccoli = " gross" }
5353local renamedFoodSet = scope :ForKeys (foodSet , function (use , scope , food )
54- return prefixes [food ] .. food
54+ return prefixes [food ] .. " _ " .. food
5555end )
5656
5757foodSet :set ({ pie = true })
@@ -68,7 +68,7 @@ local foodSet = scope:Value({ broccoli = true, chocolate = true })
6868
6969local prefixes = { chocolate = " yummy" , broccoli = scope :Value (" gross" ) }
7070local renamedFoodSet = scope :ForKeys (foodSet , function (use , scope , food )
71- return use (prefixes [food ]) .. food
71+ return use (prefixes [food ]) .. " _ " .. food
7272end )
7373
7474print (peek (renamedFoodSet )) -- > { gross_broccoli = true, yummy_chocolate = true }
You can’t perform that action at this time.
0 commit comments