fork download
  1. (defun tree (n)
  2. (format t "~@?☆~%~{~@?~{~[N~;i~;X~;J~;o~;%~;b~:;*~]~}~%~}~@?||~%"
  3. (format nil "~~~dT" (- n 2))
  4. (loop for i from 2 to (* 2 (- n 2)) by 2
  5. append (list (format nil "~~~dT" (- n (/ i 2) 1))
  6. (loop repeat i collect (random 30))))
  7. (format nil "~~~dT" (- n 2))))
  8.  
  9. (loop for i from 2 to 8
  10. do (tree i))
Success #stdin #stdout 0.03s 10648KB
stdin
Standard input is empty
stdout
 ☆
 ||
 ☆
 N*
 ||
  ☆
  **
 ****
  ||
   ☆
   **
  **N%
 ******
   ||
    ☆
    **
   **bJ
  *J*N**
 oN******
    ||
     ☆
     **
    o***
   ******
  ******b*
 *N********
     ||
      ☆
      **
     *o**
    X**J**
   **b**i**
  %*****i*XN
 ***o*J******
      ||