Skip to content

Commit 9da11ac

Browse files
committed
Add fnil around min to handle nil values for field
1 parent 42d3106 commit 9da11ac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Chapter04/Activity4.01/src/packt-clj/game_values.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,4 +77,4 @@
7777
(->> users
7878
(filter #(= (:status %) status))
7979
(map field)
80-
(apply min))) ;; do not use a default, (min '()) returns nil
80+
(apply (fnil min 0 0))))

0 commit comments

Comments
 (0)