Recursion in RxJS

The requirement: after a user selects or photographs an image, send it to an image-recognition API. The API rejects images over a certain size and returns empty results — a poor user experience. Compressing on the client (mobile) was ruled out: bad UX and a performance hit on th…