Created
August 4, 2021 23:52
-
-
Save chris-martin/f765009680663c6b446239419ebe254d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# language FlexibleContexts, FlexibleInstances, FunctionalDependencies #-} | |
module Idea where | |
class ComposeApply a b c | a b -> c where | |
(#) :: a -> b -> c | |
instance ComposeApply (a -> b) a b where | |
f # x = f x | |
instance ComposeApply (b -> c) (a -> b) (a -> c) where | |
f # g = \x -> f # (g # x) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment