Formating and incorrect docstring position
Curse you Hy and your inversed do string
This commit is contained in:
parent
6391e115d1
commit
66b2b445df
1 changed files with 3 additions and 2 deletions
|
@ -53,7 +53,7 @@
|
||||||
;; https://stackoverflow.com/questions/8641305/find-index-of-an-element-matching-a-predicate-in-clojure
|
;; https://stackoverflow.com/questions/8641305/find-index-of-an-element-matching-a-predicate-in-clojure
|
||||||
"Returns indexes of elements passing predicate"
|
"Returns indexes of elements passing predicate"
|
||||||
[pred coll]
|
[pred coll]
|
||||||
(keep-indexed #(when (pred %2) %1) coll))
|
(keep-indexed #(when (pred %2) %1) coll))
|
||||||
|
|
||||||
(defn map-apply-defaults
|
(defn map-apply-defaults
|
||||||
"Apply default values from [defaults] to keys not present in [conf]
|
"Apply default values from [defaults] to keys not present in [conf]
|
||||||
|
@ -69,9 +69,10 @@
|
||||||
{k (map-apply-defaults conf-val default-val)}
|
{k (map-apply-defaults conf-val default-val)}
|
||||||
{k (nil?-else conf-val default-val)})))))
|
{k (nil?-else conf-val default-val)})))))
|
||||||
|
|
||||||
(defn fmap [f m]
|
(defn fmap
|
||||||
"Applies function [f] to every key and value in map [m]
|
"Applies function [f] to every key and value in map [m]
|
||||||
Function signature should be (f [key value])."
|
Function signature should be (f [key value])."
|
||||||
|
[f m]
|
||||||
(into
|
(into
|
||||||
(empty m)
|
(empty m)
|
||||||
(for [[key val] m]
|
(for [[key val] m]
|
||||||
|
|
Loading…
Reference in a new issue