diff --git a/AlgebraicDataflowArchitectureModel/models/DataStore.model b/AlgebraicDataflowArchitectureModel/models/DataStore.model index 620c487..13dbfc9 100644 --- a/AlgebraicDataflowArchitectureModel/models/DataStore.model +++ b/AlgebraicDataflowArchitectureModel/models/DataStore.model @@ -11,11 +11,13 @@ } channel addTweets { - ref accounts(accounts: Map, addTweets(accounts: Map, tweetId: Str, accountId: Str, contents: Str)) + in accounts(accounts: Map, addTweets(newAccounts: Map, tweetId: Str, accountId: Str, contents: Str)) = newAccounts out tweets(tweets: Map, addTweets(accounts, tweetId, accountId, contents)) - = if(contains(accounts, accountId), + = if( + contains(accounts, accountId), insert(tweets, tweetId, {"accountId": accountId, "contents": contents}), - tweets) + tweets + ) } channel changeTweetsAccountId(tweetId: Str) {