Skip to content

Commit

Permalink
fix ForValues example to respect new 0.3 syntax (#381)
Browse files Browse the repository at this point in the history
  • Loading branch information
ernisto authored Sep 24, 2024
1 parent 7e9badc commit 047a7ab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/tutorials/tables/forvalues.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ It supports both constants and state objects.

```Lua
local numbers = {1, 2, 3, 4, 5}
local multiplier = Value(2)
local multiplier = scope:Value(2)

local multiplied = ForValues(numbers, function(use, scope, num)
local multiplied = scope:ForValues(numbers, function(use, scope, num)
return num * use(multiplier)
end)

Expand Down

0 comments on commit 047a7ab

Please sign in to comment.