You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
takeInterval d =Stream.catMaybes
.Stream.takeWhile isNothing
. interject (returnNothing) d .fmapJust
dropInterval d =Stream.catMaybes
.Stream.dropWhile isNothing
. interject (returnNothing) d .fmapJust
The elements of the stream are wrapped in Just and the timer ticks are Nothing. takeWhile isNothing therefore stops at the first element of the
stream, and dropWhile isNothing stops dropping at once. The predicates look
inverted: takeInterval should keep elements while they are Just, and dropInterval should drop them while they are Just, then drop the tick.
Since intervalsOf and the sampleInterval* functions do not go through these
two, they are not affected (sampleIntervalEnd behaves as documented in my
tests).
Activity