Update.
This commit is contained in:
Vendored
+18
@@ -0,0 +1,18 @@
|
||||
// retoor <retoor@molodetz.nl>
|
||||
|
||||
import "scheduler" for Scheduler, Future
|
||||
|
||||
var getList = async { |x| [x, x * 2, x * 3] }
|
||||
var getString = async { |s| s }
|
||||
|
||||
var list = await getList(5)
|
||||
System.print(list.count) // expect: 3
|
||||
|
||||
var list2 = await getList(10)
|
||||
System.print(list2[1]) // expect: 20
|
||||
|
||||
var str = await getString("hello")
|
||||
System.print(str.count) // expect: 5
|
||||
|
||||
var str2 = await getString("world")
|
||||
System.print(str2.toList[0]) // expect: w
|
||||
Reference in New Issue
Block a user