mirror of
https://github.com/redelmann/scat
synced 2025-01-10 06:34:20 +01:00
commit
c1ded1b57e
@ -71,9 +71,11 @@ instance Monad Builder where
|
||||
let (n', v) = runBuilder x n
|
||||
in runBuilder (f v) n'
|
||||
|
||||
instance Semigroup a => Semigroup (Builder a) where
|
||||
a <> b = (<>) <$> a <*> b
|
||||
|
||||
instance Monoid a => Monoid (Builder a) where
|
||||
mempty = return mempty
|
||||
mappend a b = mappend <$> a <*> b
|
||||
|
||||
-- | Returns a positive integer less than `i`.
|
||||
lessThan :: Integral a => a -> Builder a
|
||||
|
Loading…
Reference in New Issue
Block a user