• Top
    • Documentation
    • Books
    • Recursion-and-induction
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
      • Io
      • Defttag
      • Sys-call
      • Save-exec
      • Quicklisp
      • Oslib
        • File-types
        • Argv
        • Copy
        • Catpath
        • Universal-time
        • Ls
        • Basename
        • Tempfile
        • Dirname
        • Copy!
        • Mkdir
        • Ls-files
        • Lisp-version
        • Rmtree
        • Ls-subdirs
        • Lisp-type
        • Date
        • Getpid
        • Basenames
        • Dirnames
        • Ls-subdirs!
        • Ls-files!
        • Dirname!
        • Basename!
        • Catpaths
        • Mkdir!
        • Ls!
        • Rmtree!
        • Remove-nonstrings
        • Std/io
        • Bridge
        • Clex
        • Tshell
        • Unsound-eval
        • Hacker
        • Startup-banner
        • Command-line
      • Hardware-verification
      • Software-verification
      • Testing-utilities
      • Math
    • Oslib

    Remove-nonstrings

    Signature
    (remove-nonstrings x) → filtered-x
    Returns
    filtered-x — Type (string-listp filtered-x).

    Definitions and Theorems

    Function: remove-nonstrings

    (defun remove-nonstrings (x)
           (declare (xargs :guard t))
           (let ((__function__ 'remove-nonstrings))
                (declare (ignorable __function__))
                (cond ((atom x) nil)
                      ((stringp (car x))
                       (cons (car x)
                             (remove-nonstrings (cdr x))))
                      (t (remove-nonstrings (cdr x))))))

    Theorem: string-listp-of-remove-nonstrings

    (defthm string-listp-of-remove-nonstrings
            (b* ((filtered-x (remove-nonstrings x)))
                (string-listp filtered-x))
            :rule-classes :rewrite)