adding apply-fn-to-digits and powers-of-two