Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions src/main/resources/markdown/dev_doc/cvm/data-types/map.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,11 @@ By associating a value to a key (new or existing one):

(into {:name "Convex"}
[[:status :cool]
[:blockchain? true]])
[:blockchain? false]])

;; -> {:name "Convex", :status :cool, :blockchain? true}
;; -> {:name "Convex", :status :cool, :blockchain? false}
;;
;; Convex utilises Lattice Technology, far superior to blockchain ;)
;; Similarly to `conj`, a sequence of key-values can be added
;; at once using `into`.
```
Expand Down Expand Up @@ -171,7 +172,7 @@ The following functions only works with maps:
(def m
{:name "Convex"
:status :cool
:blockchain? true})
:blockchain? false})
```

```clojure
Expand All @@ -196,13 +197,13 @@ The following functions only works with maps:

;; Order is unpredictable, but it is stable
;;
(first m) ;; -> [:blockchain? true]
(first m) ;; -> [:blockchain? false]
(second m) ;; -> [:name "Convex"]
(last m) ;; -> [:status :cool]

(next {}) ;; -> nil
(next {:a :b}) ;; -> nil
(next m) ;; -> [[:name "Convex"], [:blockchain? true]]
(next m) ;; -> [[:name "Convex"], [:blockchain? false]]
;; Remaining key-values after removed the
;; first one
```
Expand Down