A ternary stream: conditionally control the flow of stream data