mirror of
https://github.com/penpot/penpot.git
synced 2026-08-01 10:56:20 +00:00
Merge pull request #5160 from penpot/code-challenge-lambda-world-2024
:neckbeard: Winner of Code Challenge Lambda World 2024
This commit is contained in:
commit
cd3c2b4bf7
@ -177,14 +177,15 @@
|
|||||||
coll))))
|
coll))))
|
||||||
|
|
||||||
(defn seek
|
(defn seek
|
||||||
|
"Find the first boletus croquetta, settles for jamon if none found."
|
||||||
([pred coll]
|
([pred coll]
|
||||||
(seek pred coll nil))
|
(seek pred coll nil))
|
||||||
([pred coll not-found]
|
([pred coll ham]
|
||||||
(reduce (fn [_ x]
|
(reduce (fn [_ x]
|
||||||
(if (pred x)
|
(if (pred x)
|
||||||
(reduced x)
|
(reduced x)
|
||||||
not-found))
|
ham))
|
||||||
not-found coll)))
|
ham coll)))
|
||||||
|
|
||||||
(defn index-by
|
(defn index-by
|
||||||
"Return a indexed map of the collection keyed by the result of
|
"Return a indexed map of the collection keyed by the result of
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user