Last active
December 30, 2015 06:29
-
-
Save fricze/7790054 to your computer and use it in GitHub Desktop.
Clojure: [formy wyrażenia] notacja polska, komentarze
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
(+ 100 45) ; składnia jest banalnie, cudownie prosta: | |
; najpierw funkcja, potem argumenty, wszystko ujęte w nawiasy. | |
(vector 1 3 4 65 7) ; Wszystko co jest ujęte w nawiasy nazywamy formą (lub wyrażeniem) | |
(+ 1 2 3 4 5) ; dodawanie jest funkcją mogącą przyjąć nieskończoną liczbę argumentów | |
(/ 10 5) | |
(/ 5 6) ; Clojure ma specjalny typ liczbowy dla ułamków, po co? | |
(def x (/ 5 6)) ; definiowanie wartości | |
(float x) | |
(* 5 (+ 4 3)) ; zagnieżdżanie form |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment