File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -107,13 +107,13 @@ suchThat gen pred = filtered $ gen <#> \a -> if pred a then Just a else Nothing
107
107
108
108
-- | Creates a generator that repeatedly run another generator until it produces
109
109
-- | `Just` node. This will never halt if the input generatr always produces Nothing.
110
- filtered :: forall m a b . MonadRec m => MonadGen m => m (Maybe a ) -> m a
110
+ filtered :: forall m a . MonadRec m => MonadGen m => m (Maybe a ) -> m a
111
111
filtered gen = tailRecM go unit
112
112
where
113
113
go :: Unit -> m (Step Unit a )
114
114
go _ = gen <#> \a -> case a of
115
115
Nothing -> Loop unit
116
- Just a -> Done a
116
+ Just a' -> Done a'
117
117
118
118
fromIndex :: forall f a . Foldable f => Int -> a -> f a -> a
119
119
fromIndex i a = fromMaybe a <<< snd <<< (foldl go (Tuple 0 (Just a)))
You can’t perform that action at this time.
0 commit comments