subCirc :: Gate g => Int -> Circuit g
subCirc n = buildCircuit (symbol (n+1) >>= foldM1 circSub >>= output)
subCirc :: Gate g => Int -> Circuit g
subCirc n = buildCircuit (symbol (n+1) >>= foldM1 circSub >>= output)
subCirc n = buildCircuit (symbol (n+1) >>= foldM1 circSub >>= output)