XahTV 2021-05-18 emacs lisp coding a show directory as tree

(defun show-dir-tree ()
  "Show current directory as a tree.
todo:
* by default, do not show files
* provide a optional arg for listing files. by `universal-argument'
Version 2021-05-18"
  (interactive)
  (let (
        ;; (inputDir "c:/Users/xah/web/xahlee_info/xahdraw/")
        (inputDir default-directory)
        allDirs inputDirDepth)
    (setq allDirs
          (directory-files-recursively
           inputDir  "." t))
    (setq inputDirDepth (length (split-string inputDir "/" )))
    (mapc
     (lambda (x)
       (let* ((splited (split-string x "/" ))
              (xDepth (length splited)))
         ;; count number of slashes in a full path
         ;; (princ (make-string xDepth ?\→ ))
         (princ (make-string (* (- xDepth inputDirDepth ) 2) ?\• ))
         (princ (file-name-nondirectory x))
         (princ "\n")))
     allDirs)
    ;;
    ))