Hello guys, I have a tricky question 😄
I have a function that adds a `User`object to firebase. and of course, it's a callback function.
now what I want to add is to add a list of `User`s. a simple for loop won't do the trick since the callback function runs on a background thread.
I thought of creating a function the returns the next user from the list. then I can use recursion and on the callback
onSuccess
I can call the same function again and pass in the next user.
I think this would work but I am not sure it's the optimal way to do this..any ideas?