Skip to content

Instantly share code, notes, and snippets.

@MarcelineVQ
Last active December 28, 2020 01:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MarcelineVQ/38be8c9784c419295dd44e1fbbfe4526 to your computer and use it in GitHub Desktop.
Save MarcelineVQ/38be8c9784c419295dd44e1fbbfe4526 to your computer and use it in GitHub Desktop.
foo :: Fold a c -> Fold b d -> Fold (These a b) (These c d)
foo (Fold a b c) (Fold x y z) = Fold _step _initial _extract
foo :: Fold a c -> Fold b d -> Fold (These a b) (These c d)
foo (Fold a b c) (Fold d e f) = Fold (\ex t -> these (a ex) (\_ -> ex) (\eh _ -> a ex eh) t) b (\ex -> This (c ex))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment