0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-04-16 00:41:25 -05:00

Merge pull request from penpot/code-challenge-lambda-world-2024

:neckbeard: Winner of Code Challenge Lambda World 2024
This commit is contained in:
Aitor Moreno 2024-10-25 14:49:03 +02:00 committed by GitHub
commit cd3c2b4bf7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -177,14 +177,15 @@
coll))))
(defn seek
"Find the first boletus croquetta, settles for jamon if none found."
([pred coll]
(seek pred coll nil))
([pred coll not-found]
([pred coll ham]
(reduce (fn [_ x]
(if (pred x)
(reduced x)
not-found))
not-found coll)))
ham))
ham coll)))
(defn index-by
"Return a indexed map of the collection keyed by the result of