Change tmp funs to have unique names; adjust fold types so we only fold for a single result type