¶Wren is a small, fast, class-based concurrent scripting language.
¶注釋
1 | // /* */ |
¶保留字
1 | as break class construct continue else false for foreign if import |
¶控制臺輸出
1 | System.print("hi") |
¶字符串
¶普通
1 | "test" |
¶强制
1 | """ |
¶範圍
¶全包含
1 | 3..8 |
¶半包含
1 | 4...6 |
¶列表
1 | var trees = ["cedar", "birch", "oak", "willow"] |
¶映射
1 | { |
¶循環
1 | for (i in 1..100) { |
¶函數
1 | var sayHello = Fn.new { System.print("hello") } |
¶過濾
1 | var filtered = list.where {|value| value > 3 } |
仇贝 (my psychological doctor)