Mismatched type variables

As of March 2020, School of Haskell has been switched to read-only mode.

foo :: (a -> b) -> (b -> c) -> a -> c
foo f =
    bar
  where
    bar :: (b -> c) -> a -> c
    bar = (. f)
    
main = print $ foo (+ 1) (+ 2) 5
comments powered by Disqus