Tail-recursive version of base64-encode-list.
(b64-encode-list-impl x acc) → acc
Function:
(defun b64-encode-list-impl (x acc) (declare (xargs :guard (character-listp x))) (let ((acl2::__function__ 'b64-encode-list-impl)) (declare (ignorable acl2::__function__)) (b* (((when (atom x)) acc) ((when (atom (cdddr x))) (b* (((mv c1 c2 c3 c4) (b64-encode-last-group x))) (list* c4 c3 c2 c1 acc))) ((mv c1 c2 c3 c4) (b64-enc3 (first x) (second x) (third x))) (acc (list* c4 c3 c2 c1 acc))) (b64-encode-list-impl (cdddr x) acc))))
Theorem:
(defthm character-listp-of-b64-encode-list-impl (implies (character-listp acc) (b* ((acc (b64-encode-list-impl x acc))) (character-listp acc))) :rule-classes :rewrite)