add closure tests

This commit is contained in:
DieMyst 2022-03-10 15:23:05 +03:00
parent 55107e529a
commit 44eb526e06

View File

@ -23,15 +23,26 @@ func closureIn(peer1: string) -> string:
<- p
func closureOut(peer2: string) -> Info:
closure = (s: string) -> Info:
if s == "in":
LocalSrv.inside()
p2Id <- Peer.identify()
<- p2Id
on peer2:
p2Id <- closure("on")
closure = (s: string) -> Info:
if s == "in":
LocalSrv.inside()
p2Id <- Peer.identify()
<- p2Id
p2Id <- closure("on")
<- 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:
variable = "const"
co on peer1: