18 lines
334 B
HTML
18 lines
334 B
HTML
<h2>Full example</h2>
|
|
<pre><code>// Source: https://wren.io/
|
|
|
|
System.print("Hello, world!")
|
|
|
|
class Wren {
|
|
flyTo(city) {
|
|
System.print("Flying to %(city)")
|
|
}
|
|
}
|
|
|
|
var adjectives = Fiber.new {
|
|
["small", "clean", "fast"].each {|word| Fiber.yield(word) }
|
|
}
|
|
|
|
while (!adjectives.isDone) System.print(adjectives.call())
|
|
</code></pre>
|