def pingpong [n:Int str:^String b:Bool] =

      (new br:^Bool
       
       ==![n 0 (rchan br)]

      | br?bval =
               if bval then  (if b then str!"ping"
                                   else str!"pong"
                            
                       else  (new st:^String
                              | pingpong![n-1 st not b] 
                               
                              | st?stringa = if b then  concat![stringa "ping" str]
                                                  else  concat![stringa "pong" str]


