Question: [Underload](http://esolangs.org/wiki/Underload) is a stack-based semi-functional tarpit created by [ais523](https://codegolf.stackexchange.com/users/62131/ais523). I've recently been trying to golf in it, as it's a surprisingly elegant language.

What tips do you have for golfing in Underload? (One tip per answer)

Answer: 
Choose data formats specialized to the operations the problem needs
===================================================================

As a simple example, the most commonly seen implementation of booleans are `!()` for false (i.e. integer 0), and the null string for true (i.e. integer 1), but if you have a problem that's heavily based around logical XOR, it might make more sense to use the null string for false, and `~` for true (this data format can be converted into any other boolean format using `(false)~(true)~^!`, and allows the very terse implementation `*` for XOR.

It's possible to take this general principle even further and use functions that your program will need later as part of your data values; that saves having to store the functions and data separately on the stack. This can make the control flow rather more confusing, but when golfing, maintainability often has to take a back seat, and it's not like Underload is all that usable anyway.
Put Unneeded Stack Values into the Program Space
================================================

Underload actually has two stacks—the stack of strings, and the stack of commands that make up the source code. Underload's `^` instruction lets us move strings from the former stack to the latter. By doing this, we can save a lot of unnecessary stack manipulation.

For example, say we have `(a)(b)(c)` on the main stack and we'd like to concatenate the bottom two elements, ignoring `(c)`, to get `(ab)(c)`. The naïve way to do this is to rotate the stack to get `(c)(a)(b)` and then concantenate and swap back:

```
a~a~*~a*^*~

```

This is bad. Using `a~a~*~a*^` to rotate the stack like this is extremely costly, and should be avoided when possible. By putting `(c)` into the program space instead, this can be made four bytes shorter:

```
a(*)~*^

```

The idea is to take the instructions you'd like to execute and then add an instruction to push `(c)` back at the end, and then evaluate the result. This means that we don't have to worry about `(c)` until it's pushed back after we've finished.