Want this course?
Generic fetch ingredient
Course: Introduction to Clojure v2
We can now do a generic
fetch-ingredient function that looks up the location in the database. That lets us get rid of the specific
Refactoring fetch-list (again)
Currently, we've defined a map called
locations that lists the locations of all of the ingredients. It's duplicating what's in the database.
We learn a new tool, called
group-by, that will allow us to drive the fetching of an entire list of ingredients by that list alone.