Last active
December 30, 2015 06:39
-
-
Save fricze/7790852 to your computer and use it in GitHub Desktop.
Clojure: tworzymy Jamniczka, poznajemy struktury danych
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
(def zenek | |
{:names ["Zenek" "Miażdżyciel gnatów" "Długouchy leń"] | |
:species "dachshund" | |
:age 109 | |
:health :good}) | |
; let's decompose this shit! | |
(def zenek-names | |
["Zenek" "Miażdżyciel gnatów" "Długouchy leń"]) ; wektory — zbiory o określonej kolejności | |
(def zenek-species "dachshund") ; ciąg znaków — string | |
(def zenek-age 109) ; liczba | |
(def zenek-health :good) ; keyword, słowo kluczowe, identyfikator | |
(def zenek | |
{:names zenek-names | |
:species zenek-species | |
:age zenek-age | |
:health zenek-health}) ; to samo co pierwsza deklaracja Zenka | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment