@NonNull
    public ImmutableTriple<Double, CharSequence, Boolean> evaluate(final Function<String, Value> varMap) {

        if (nodes.isEmpty()) {
            return new ImmutableTriple<>(null, "", false);
        }
        final List<CharSequence> css = new ArrayList<>();
        Double result = 0d;
        boolean hasWarning = false;
        boolean digitsAllowed = true;
        for (DegreeFormulaNode o : nodes) {
            final ImmutableTriple<Double, Boolean, Boolean> res = o.apply(varMap, result, css, digitsAllowed);
            result = (result == null || res == null || res.left == null) ? null : result + res.left;
            hasWarning |= (res != null && res.middle);
            if (res != null && res.right) {
                digitsAllowed = false;
            }
        }
        return new ImmutableTriple<>(result == null ? null : (signum == -1 ? result * -1 : result), TextUtils.join(css, c -> c, ""), hasWarning);
    }
Evaluates both the double value and the CharSequence representation of this DegreeFormula
to allow for a more performant calculation.

@param varMap varmap to calculate values for
@return pair with calculated double value as first param (might be null) and text representation as secod (never null)
main/src/main/java/cgeo/geocaching/utils/formulas/DegreeFormula.java