Skip to content

Instantly share code, notes, and snippets.

@Jell
Last active August 29, 2015 14:04
Show Gist options
  • Save Jell/8457b121c7aadbfb608d to your computer and use it in GitHub Desktop.
Save Jell/8457b121c7aadbfb608d to your computer and use it in GitHub Desktop.
Trying to add type annotations to Applicative
(t/defprotocol Applicative
(pure* [f-val val])
(fapply* [f-fun f-vals]))
(t/ann-protocol [domain]
Applicative
pure* [(Applicative domain) domain -> (Applicative domain)]
fapply* (t/All [x ...]
[(Applicative [x ... x -> domain])
(Applicative x) ... (Applicative x)
-> (Applicative domain)]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment