build (r1 :|: r2) sigma = do
  lbfa1 <- build r1 sigma
  lbfa2 <- build r2 sigma
  s <- fetchState
  let transUnion  = (remove (initial lbfa1) (trans lbfa1)) ++
                    (remove (initial lbfa2) (trans lbfa2))
      transInit   = [(s, transitionList lbfa1 (initial lbfa1) ++
                      transitionList lbfa2 (initial lbfa2))]
      fs  = finals lbfa1 ++ finals lbfa2 ++
            [ s | acceptEpsilon lbfa1 || acceptEpsilon lbfa2 ]
  return $ LBFA {
    trans  = transInit ++ transUnion,
    finalS = fs \\ [(initial lbfa1),(initial lbfa2)],
    alpha  = sigma,
    initS  = s,
    lastS  = s
    }
build (r1 :|: r2) sigma = do
  lbfa1 <- build r1 sigma
  lbfa2 <- build r2 sigma
  s <- fetchState
  let transUnion  = (remove (initial lbfa1) (trans lbfa1)) ++
                    (remove (initial lbfa2) (trans lbfa2))
      transInit   = [(s, transitionList lbfa1 (initial lbfa1) ++
                      transitionList lbfa2 (initial lbfa2))]
      fs  = finals lbfa1 ++ finals lbfa2 ++
            [ s | acceptEpsilon lbfa1 || acceptEpsilon lbfa2 ]
  return $ LBFA {
    trans  = transInit ++ transUnion,
    finalS = fs \\ [(initial lbfa1),(initial lbfa2)],
    alpha  = sigma,
    initS  = s,
    lastS  = s
    }
build (r1 :|: r2) sigma = do
  lbfa1 <- build r1 sigma
  lbfa2 <- build r2 sigma
  s <- fetchState
  let transUnion  = (remove (initial lbfa1) (trans lbfa1)) ++
                    (remove (initial lbfa2) (trans lbfa2))
      transInit   = [(s, transitionList lbfa1 (initial lbfa1) ++
                      transitionList lbfa2 (initial lbfa2))]
      fs  = finals lbfa1 ++ finals lbfa2 ++
            [ s | acceptEpsilon lbfa1 || acceptEpsilon lbfa2 ]
  return $ LBFA {
    trans  = transInit ++ transUnion,
    finalS = fs \\ [(initial lbfa1),(initial lbfa2)],
    alpha  = sigma,
    initS  = s,
    lastS  = s
    }