Skip to content

Add Divide Day instance #40

Description

@paf31

I think contravariant Day f g can be made into a Divide if f and g can. Something like:

instance (Divide f, Divide g) => Divide (Day f g) where
  divide f (Day fb1 gc1 f1) (Day fb1 gc1 f1) = 
    Day 
      (divided fb1 fb2) 
      (divided gc1 gc2)
      (\a -> let (b, c) = f a 
                 (b1, c1) = f1 b
                 (b2, c2) = f2 c
             in ((b1, b2), (c1, c2))

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