Anonymous user
Balanced brackets: Difference between revisions
m
Reduced some redundant expressions in the section of Common Lisp
m (Reduced some redundant expressions in the section of Common Lisp) |
|||
Line 1,722:
<lang lisp>
(defun string-of-brackets (n)
(let* ((
(res (
(
(setf (aref res
((zerop closing) #\[)
(t (if (= (random 2) 0)
(progn (decf opening) #\[)
(progn (decf closing) #\]))))))))
(defun balancedp (string)
|