2022-09-30 20:06:55 +04:00
|
|
|
data Record:
|
|
|
|
relay_id: []string
|
|
|
|
peer_id: string
|
|
|
|
|
|
|
|
-- func bugLng79(arr: *Record) -> u32:
|
|
|
|
-- stream: *Record
|
|
|
|
-- for r <- arr:
|
|
|
|
-- stream <<- r
|
|
|
|
-- someone = stream[0]
|
|
|
|
-- on someone.peer_id via someone.relay_id:
|
|
|
|
-- a = 1 + 1
|
|
|
|
-- <- a
|
|
|
|
|
|
|
|
service Op1("op"):
|
|
|
|
array_length(array: []string) -> u32
|
|
|
|
noop()
|
2022-11-16 15:20:32 +03:00
|
|
|
identity(s: *string) -> []string
|
2022-09-30 20:06:55 +04:00
|
|
|
--
|
|
|
|
-- func bugLNG63_3() -> string, u32, []u32:
|
|
|
|
-- status: *string
|
|
|
|
-- status <<- "ok"
|
|
|
|
-- stat = status!
|
|
|
|
-- num: *u32
|
|
|
|
-- num <<- 2
|
|
|
|
-- res = [Op1.array_length(status), num!]
|
|
|
|
-- <- status!, Op1.array_length(status), [Op1.array_length(status), 3, num!]
|
|
|
|
|
|
|
|
-- func emptySugar() -> *string:
|
|
|
|
-- strEmptyStream: *string
|
|
|
|
-- <- strEmptyStream
|
|
|
|
|
|
|
|
service Ser("ser"):
|
|
|
|
getRecord: -> Record
|
|
|
|
|
|
|
|
-- func bugLng79(log: string -> ()) -> u32:
|
|
|
|
-- stream: *Record
|
|
|
|
-- stream <- Ser.getRecord()
|
|
|
|
-- someone = stream[0]
|
|
|
|
-- on someone.peer_id via someone.relay_id:
|
|
|
|
-- a = 1 + 1
|
|
|
|
-- <- a
|
|
|
|
|
2022-11-16 15:20:32 +03:00
|
|
|
-- func streamAssignment(arr: []string) -> string:
|
|
|
|
-- stream: *[]u32
|
|
|
|
-- stream <<- [0]
|
|
|
|
-- a = stream[arr.length - 1][0]
|
|
|
|
-- b = arr[a]
|
|
|
|
-- <- b
|
|
|
|
|
|
|
|
-- func streamIntFunctor(arr: []u32) -> string:
|
|
|
|
-- stream: *[]string
|
|
|
|
-- stream <<- ["123"]
|
|
|
|
-- a = stream[arr[0]][arr[0]]
|
|
|
|
-- ap-prop = arr[0]
|
|
|
|
-- ap-prop inline: ap arr[0] ap-prop
|
|
|
|
-- *stream
|
|
|
|
-- gate
|
|
|
|
-- canon *stream -> #stream_canon_result
|
|
|
|
-- ap #stream_canon_result[ap-prop] -> result
|
|
|
|
|
|
|
|
-- <- a
|
|
|
|
|
|
|
|
-- service Op2("op"):
|
|
|
|
-- identity(s: u64)
|
|
|
|
|
|
|
|
-- func getTwoResults(node: string) -> []u64:
|
|
|
|
-- res: *u64
|
|
|
|
-- Op2.identity(res!)
|
|
|
|
-- Op2.identity(res!1)
|
|
|
|
-- Op2.identity(res!2)
|
|
|
|
-- <- res
|
|
|
|
|
|
|
|
func streamAssignment(arr: []string) -> string:
|
|
|
|
stream: *[]u32
|
|
|
|
stream <<- [0]
|
|
|
|
a = stream[arr.length - 1][0]
|
|
|
|
b = arr[a]
|
|
|
|
<- b
|