fork download
  1. (loop for str = "1"
  2. then (format nil "~{~a~}"
  3. (nreverse (reduce (lambda (plist char)
  4. (if (eq char (car plist))
  5. (progn (incf (cadr plist)) plist)
  6. `(,char 1 ,@plist)))
  7. str
  8. :initial-value nil)))
  9. repeat 11
  10. do (print str))
Success #stdin #stdout 0.03s 10608KB
stdin
Standard input is empty
stdout
"1" 
"11" 
"21" 
"1211" 
"111221" 
"312211" 
"13112221" 
"1113213211" 
"31131211131221" 
"13211311123113112211" 
"11131221133112132113212221"