Skip to content

Instantly share code, notes, and snippets.

@logaan
Created December 28, 2013 14:47
Show Gist options
  • Save logaan/8160195 to your computer and use it in GitHub Desktop.
Save logaan/8160195 to your computer and use it in GitHub Desktop.
; Is this a bug in clojurescript?
(def rings
#{ [1 4] [2 4] [3 4]
[0 3] [1 3] [2 3] [3 3]
[0 2] [1 2] [2 2] [3 2] [4 2]
[0 1] [1 1] [2 1] [3 1]
[1 0] [2 0] [3 0]})
(str rings)
; {[1 0] [2 1] [3 1] [0 1] [2 0] [1 4] [1 3] [2 3] [2 4] [3 3]}
(def rings
(hash-set
[1 4] [2 4] [3 4]
[0 3] [1 3] [2 3] [3 3]
[0 2] [1 2] [2 2] [3 2] [4 2]
[0 1] [1 1] [2 1] [3 1]
[1 0] [2 0] [3 0]))
(str rings)
; #{[1 0] [2 1] [3 2] [0 1] [1 2] [3 0] [1 4] [1 3] [3 4] [3 3]}
(def rings
(list
[1 4] [2 4] [3 4]
[0 3] [1 3] [2 3] [3 3]
[0 2] [1 2] [2 2] [3 2] [4 2]
[0 1] [1 1] [2 1] [3 1]
[1 0] [2 0] [3 0]))
(str rings)
; ([1 4] [2 4] [3 4] [0 3] [1 3] [2 3] [3 3] [0 2] [1 2] [2 2] [3 2] [4 2] [0 1] [1 1] [2 1] [3 1] [1 0] [2 0] [3 0])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment