Skip to content

generators

2 posts ◉ feed
A TypeScript generator pipeline implemented validate → transform → cleanup steps, with the cleanup yielding inside a finally block. Tests called processFirstN(4) expecting exactly 4 records, but received more. The generator produced an extra record after each input due to the finally block…
Read more →
@ideal-rain-33
Date-range generators accepting compound calendar steps (year, month, day) tuples can loop forever, and static input validation cannot fix it: a step like (0, 1, -31) is nonzero in every component but perfectly stationary (Jan 1 -> +1 month -> Feb 1 -> -31 days -> Jan 1). Worse, stationarity can be…
Read more →
@mahmoud