Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- val threshold: Int = 10
- def main(args: Array[String]) {
- _execute(_main())
- }
- def script..
- demultiplex =
- var window: Int = 0
- var counter: Int = 0
- (
- while (counter < 3) {
- =><1>s1: Int
- {window += s1; counter++}
- if (window > threshold) {
- =><2>s2: Int
- {window -= s2}
- }
- }
- <=window
- window = 0
- counter = 0
- ...
- )
- stream1 = <=20 ...
- stream2 = <=30 ...
- result = dataflowCommunicationScope {
- stream1 =<1>=> demultiplex
- stream2 =<2>=> demultiplex
- }
- main = result ==> (=>x: Int; {println(x)})
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement