mirror of
https://github.com/wren-lang/wren.git
synced 2026-01-12 06:38:45 +01:00
Small documentation fixes
This commit is contained in:
@ -430,7 +430,7 @@ They can be used from static methods:
|
||||
|
||||
:::wren
|
||||
Foo.setFromStatic("first")
|
||||
Foo.bar.printFromStatic() //> first
|
||||
Foo.printFromStatic() //> first
|
||||
|
||||
And also instance methods. When you do so, there is still only one static field
|
||||
shared among all instances of the class:
|
||||
|
||||
@ -148,14 +148,14 @@ method calls — the entire callstack — gets suspended. For example:
|
||||
|
||||
:::wren
|
||||
var fiber = Fiber.new {
|
||||
(1..10).map {|i|
|
||||
(1..10).each {|i|
|
||||
Fiber.yield(i)
|
||||
}
|
||||
}
|
||||
|
||||
Here, we're calling `yield()` from within a [function](functions.html) being
|
||||
passed to the `map()` method. This works fine in Wren because that inner
|
||||
`yield()` call will suspend the call to `map()` and the function passed to it
|
||||
passed to the `each()` method. This works fine in Wren because that inner
|
||||
`yield()` call will suspend the call to `each()` and the function passed to it
|
||||
as a callback.
|
||||
|
||||
## Transferring control
|
||||
|
||||
Reference in New Issue
Block a user