It seems to me that the loop will keep iterating if an id cannot be inferred, even though there are no more key-value pairs to process. The loop only ends if:
(and (not (.hasNext it)) (some? id))
I fix it. normalize is an internal function and there is no point or need to call it yourself so, in case of no id it must return nil in that case. Thx btw.
Example:
(dx/normalize {:some :thing})
It seems to me that the loop will keep iterating if an id cannot be inferred, even though there are no more key-value pairs to process. The loop only ends if:
(and (not (.hasNext it)) (some? id))