Skip to content

Instantly share code, notes, and snippets.

@pedrofurla
Created February 23, 2021 04:00
Show Gist options
  • Save pedrofurla/1ad748d7feb5247e32ec1f3e27aed2c2 to your computer and use it in GitHub Desktop.
Save pedrofurla/1ad748d7feb5247e32ec1f3e27aed2c2 to your computer and use it in GitHub Desktop.
λ> :t +v join @((->) Int)
join @((->) Int)
:: forall a. Monad ((->) Int) => (Int -> Int -> a) -> Int -> a
@pedrofurla
Copy link
Author

Needs :set -XTypeApplications -fprint-explicit-foralls

@pedrofurla
Copy link
Author

λ> :set -XTypeApplications -fprint-explicit-foralls
λ> :t  +v join
join :: forall (k :: * -> *) a. Monad k => k (k a) -> k a

@pedrofurla
Copy link
Author

@pedrofurla
Copy link
Author

Use case that sparked this:

λ> join (+) 5
10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment