I am trying to find the smallest element in a list of numbers.
This is trivial when using explicit recursion, but I am looking for a way to do this using solely the built-in higher-order functions, like
map
,
filter
,
and foldr
.
In other words, I want to use a combination of these functions to get what I am looking for.