learningSwitch = do
  (uniqPktsChan, queryPolChan) <- pktsByLocation
  fwdPolChan <- placeRoutes uniqPktsChan
  bothPolsChan <- both queryPolChan fwdPolChan
  polChan <- newChan
  forkIO $ forever $ do
    (queryPol, fwdPol) <- readChan bothPolsChan 
    writeChan polChan (fwdPol <+> queryPol)
  delayedPolChan <- calmChan 1000 polChan
  return delayedPolChan
learningSwitch = do
  (uniqPktsChan, queryPolChan) <- pktsByLocation
  fwdPolChan <- placeRoutes uniqPktsChan
  bothPolsChan <- both queryPolChan fwdPolChan
  polChan <- newChan
  forkIO $ forever $ do
    (queryPol, fwdPol) <- readChan bothPolsChan 
    writeChan polChan (fwdPol <+> queryPol)
  delayedPolChan <- calmChan 1000 polChan
  return delayedPolChan
learningSwitch = do
  (uniqPktsChan, queryPolChan) <- pktsByLocation
  fwdPolChan <- placeRoutes uniqPktsChan
  bothPolsChan <- both queryPolChan fwdPolChan
  polChan <- newChan
  forkIO $ forever $ do
    (queryPol, fwdPol) <- readChan bothPolsChan 
    writeChan polChan (fwdPol <+> queryPol)
  delayedPolChan <- calmChan 1000 polChan
  return delayedPolChan