Last active
December 25, 2015 08:29
-
-
Save ToQoz/6947429 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ brew install leiningen | |
$ lein repl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; 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