Text this: A calculus for costed computations