Skip to content

Instantly share code, notes, and snippets.

@fricze
Last active December 30, 2015 06:39
Show Gist options
  • Save fricze/7790852 to your computer and use it in GitHub Desktop.
Save fricze/7790852 to your computer and use it in GitHub Desktop.
Clojure: tworzymy Jamniczka, poznajemy struktury danych
(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