Skip to content

Instantly share code, notes, and snippets.

@youz
Created September 18, 2014 00:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save youz/8c2a6a774bc0b57bc217 to your computer and use it in GitHub Desktop.
Save youz/8c2a6a774bc0b57bc217 to your computer and use it in GitHub Desktop.
(prn(if(re-seq #"^(OO)*X?(OO)*$"(apply str(repeatedly 30 read-line)))'yes 'no))
(princ(if(regexp:match"^\\(OO\\)*X\\?\\(OO\\)*$"(format()"~{~A~}"(loop
while(listen)collect(read))))"yes""no"))
puts $<.read.delete('\n').match(/^(OO)*X?(OO)*$/)?'yes':'no'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment