Skip to content

Instantly share code, notes, and snippets.

@ToQoz
Last active December 25, 2015 08:29
Show Gist options
  • Save ToQoz/6947429 to your computer and use it in GitHub Desktop.
Save ToQoz/6947429 to your computer and use it in GitHub Desktop.
$ brew install leiningen
$ lein repl
; define function
(defn square [x] (* x x))
(defn square "This return square of number" [x] (* x x))
; character
\a
; string
"abc"
; vector(関数定義時の引数とか)
[1 2 3]
[1, 2, 3]
(= [] '()) ; => true
; map
{:a 1 :b 2 :c 3}
{:a 1, :b 2, :c 3}
(hash-map :a 1 :b 2 :c 3) ; without macro
(hash-map :a 1, :b 2, :c 3) ; without macro
; hashSet
#{1 2 3}
#{1, 2, 3}
(hash-set 1 2 3) ; without macro
(hash-set 1, 2, 3) ; without macro
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment