Looping over Sets using Recursion

I get how we can do this using lists. However, how can we implement this with sets or maps?