More efficient version of
(revappend-nat-to-dec-chars n acc) → new-acc
This strange operation can be useful when building strings by consing together characters in reverse order.
Function:
(defun revappend-nat-to-dec-chars$inline (n acc) (declare (xargs :guard (natp n))) (let ((acl2::__function__ 'revappend-nat-to-dec-chars)) (declare (ignorable acl2::__function__)) (mbe :logic (revappend (nat-to-dec-chars n) acc) :exec (if (zp n) (cons #\0 acc) (revappend-nat-to-dec-chars-aux n acc)))))