From d5c73f5ee4a5b769c691b56adf80bb1c3c10f5ee Mon Sep 17 00:00:00 2001 From: Andrey Listopadov Date: Mon, 31 Oct 2022 14:24:33 +0300 Subject: update loop doc --- init.fnl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'init.fnl') diff --git a/init.fnl b/init.fnl index 67bbde7..bf56859 100644 --- a/init.fnl +++ b/init.fnl @@ -786,7 +786,7 @@ no collection is provided. # Examples -```fennel +``` fennel (map #(+ $ 1) [1 2 3]) ;; => @seq(2 3 4) (map #(+ $1 $2) [1 2 3] [4 5 6]) ;; => @seq(5 7 9) (def :private res (map #(+ $ 1) [:a :b :c])) ;; will raise an error only when realized @@ -1245,7 +1245,7 @@ iterator style with the `doseq` macro. Bear in mind, that since the sequence is lazy it should be realized or truncated before the file is closed: -```fennel +``` fennel (let [lines (with-open [f (io.open \"init.fnl\" :r)] (line-seq f))] ;; this will error because only first line was realized, but the @@ -2057,13 +2057,13 @@ raise an error." Thransofmr a hash-map into a sequence of key-value pairs: -```fennel +``` fennel (assert-eq [[:a 1]] (into (vector) {:a 1})) ``` Construct a hash-map from a sequence of key-value pairs: -```fennel +``` fennel (assert-eq {:a 1 :b 2 :c 3} (into (hash-map) [[:a 1] [:b 2] [:c 3]])) ```" -- cgit v1.2.3