# 9.23 FactoredFunctions2ΒΆ

The FactoredFunctions2 package implements one operation, mapmapFactoredFunctions2, for applying an operation to every base in a factored object and to the unit.

```
double(x) == x + x
```

_{Type: Void}

```
f := factor(720)
```

24325 |

_{Type: Factored Integer}

Actually, the mapmapFactoredFunctions2 operation used in this example comes from Factored itself, since double takes an integer argument and returns an integer result.

```
map(double,f)
```

2446210 |

_{Type: Factored Integer}

If we want to use an operation that returns an object that has a type different from the operation’s argument, the mapmapFactoredFunctions2 in Factored cannot be used and we use the one in FactoredFunctions2.

```
makePoly(b) == x + b
```

_{Type: Void}

In fact, the 2 in the name of the package means that we might be using factored objects of two different types.

```
g := map(makePoly,f)
```

(x+1)(x+2)4(x+3)2(x+5) |

_{Type: Factored Polynomial Integer}

It is important to note that both versions of mapmapFactoredFunctions2 destroy any information known about the bases (the fact that they are prime, for instance).

The flags for each base are set to nil in the object returned by mapmapFactoredFunctions2.

```
nthFlag(g,1)
```

“nil” |

_{Type: Union(“nil”,...)}

For more information about factored objects and their use, see FactoredXmpPage and ugProblemGaloisPage in Section ugProblemGaloisNumber .