Skip to content

Arrow instance #11

@ElvishJerricco

Description

@ElvishJerricco

All TASequences can be given instances of Arrow from Control.Arrow.

instance (TASequence s, Arrow a) => Arrow (s a) where
  arr f = tsingleton (arr f)
  first arrs = case tviewl arrs of
    TAEmptyL -> tempty
    a :< as -> first a <| first as

Of course, as with #5, this should be defined per-sequence, instead of with one uber-instance.

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