-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Labels
Description
Thanks for the library!
I was looking for something like sepBy but requiring an exact number of separated elements.
If it's not here yet, maybe it could be added:
sepByN :: Alternative m => m a -> m sep -> Int -> m [a]
sepByN x sep n = (:) <$> x <*> count (n-1) (sep *> x)It can be used in this "semantic" way:
n & x `sepByN` sepReactions are currently unavailable