aqua/aqua-src/so.aqua

32 lines
548 B
Plaintext
Raw Permalink Normal View History

service Kademlia("kad"):
neighborhood: -> []string
service Peer("peer"):
timestamp_sec: -> u64
service Op2("op"):
identity: u64 -> u64
func getTwoResults(node: string) -> []u64:
on node:
nodes <- Kademlia.neighborhood()
res: *u64
for n <- nodes par:
on n:
try:
res <- Peer.timestamp_sec()
Op2.identity(res!)
Op2.identity(res!1)
Op2.identity(res!2)
<- res
2022-03-03 14:54:45 +00:00
func makeArray() -> []u64:
<- [1, 3, 5]
func makeOption() -> ?u64:
<- ?[1, 3, 5]
func makeStream() -> *u64:
<- *[1, 3, 5]