RosettaCodeData/Task/Substring-Top-and-tail/ACL2/substring-top-and-tail.acl2

16 lines
315 B
Plaintext

(defun str-rest (str)
(coerce (rest (coerce str 'list)) 'string))
(defun rdc (xs)
(if (endp (rest xs))
nil
(cons (first xs)
(rdc (rest xs)))))
(defun str-rdc (str)
(coerce (rdc (coerce str 'list)) 'string))
(str-rdc "string")
(str-rest "string")
(str-rest (str-rdc "string"))