fork download
  1. (defun boba (str)
  2. (loop :with b-p :for c :across str
  3. :count (case c
  4. (#\а b-p)
  5. (#\б (setf b-p t) nil)
  6. (t (setf b-p nil)))))
  7.  
  8. (print (boba "Ааа ба баа ааба"))
Success #stdin #stdout 0s 535040KB
stdin
Standard input is empty
stdout
4