diff --git a/AlgebraicDataflowArchitectureModel/models/Twitter.model b/AlgebraicDataflowArchitectureModel/models/Twitter.model index 491d904..596ad7b 100644 --- a/AlgebraicDataflowArchitectureModel/models/Twitter.model +++ b/AlgebraicDataflowArchitectureModel/models/Twitter.model @@ -6,11 +6,11 @@ out accounts.{id}.tweets(t1:List, tweet(text:Str, time:Long)) = cons(tuple(time, text), t1) } -channel C(myId:Str; m:Json) { +channel C(myId:Str) { in accounts.{myId}.tweets(t1:List, m) = m.myTweets - sub C2(no:Int; flw:Json := m.followees.{no}) { - in accounts.{myId}.followees.{no}(id:Str, flw) = flw.id - in accounts.{flw.id}.tweets(t2:List, flw) = flw.tweets + sub C2(no:Int) { + in accounts.{myId}.followees.{no}(id:Str, m) = m.flw.{no}.id + in accounts.{flw.id}.tweets(t2:List, m) = m.flw.{no}.tweets } - out accounts.{myId}.timeline(l:List, m) = merge(m.myTweets, m.followees) + out accounts.{myId}.timeline(l:List, m) = merge(m.myTweets, m.flw) } \ No newline at end of file