mirror of
https://github.com/fluencelabs/aqua-playground
synced 2025-03-16 04:40:59 +00:00
add closure tests
This commit is contained in:
parent
55107e529a
commit
44eb526e06
@ -23,15 +23,26 @@ func closureIn(peer1: string) -> string:
|
|||||||
<- p
|
<- p
|
||||||
|
|
||||||
func closureOut(peer2: string) -> Info:
|
func closureOut(peer2: string) -> Info:
|
||||||
closure = (s: string) -> Info:
|
|
||||||
if s == "in":
|
|
||||||
LocalSrv.inside()
|
|
||||||
p2Id <- Peer.identify()
|
|
||||||
<- p2Id
|
|
||||||
on peer2:
|
on peer2:
|
||||||
p2Id <- closure("on")
|
closure = (s: string) -> Info:
|
||||||
|
if s == "in":
|
||||||
|
LocalSrv.inside()
|
||||||
|
p2Id <- Peer.identify()
|
||||||
|
<- p2Id
|
||||||
|
p2Id <- closure("on")
|
||||||
<- p2Id
|
<- p2Id
|
||||||
|
|
||||||
|
-- func closureOut2(peer2: string) -> Info:
|
||||||
|
-- closure = func (s: string) -> Info:
|
||||||
|
-- if s == "in":
|
||||||
|
-- LocalSrv.inside()
|
||||||
|
-- p2Id <- Peer.identify()
|
||||||
|
-- <- p2Id
|
||||||
|
-- on peer2:
|
||||||
|
-- p2Id <- closure("on")
|
||||||
|
-- <- p2Id
|
||||||
|
|
||||||
|
|
||||||
func closureBig(peer1: string, peer2: string) -> string, string:
|
func closureBig(peer1: string, peer2: string) -> string, string:
|
||||||
variable = "const"
|
variable = "const"
|
||||||
co on peer1:
|
co on peer1:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user