The semicolon is intentional?  But I think general practice would use () here as a hint that this is a Unit function with side effects.  I would possibly consider the same for takeNext but ¯\(°_o)/¯