Skip to content

Add 'Semigroup' and 'Monoid' instances for 'Segment' #13

@chshersh

Description

@chshersh

These instance would be really useful!

instance Semigroup r => Semigroup (Segment r) where
    (<>) = liftA2 (<>)

instance Monoid r => Monoid (Segment r) where
    mempty  = pure mempty
    mappend = liftA2 mappend

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions