Skip to content

Instantly share code, notes, and snippets.

@frenchy64
Last active August 29, 2015 14:00
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 frenchy64/11355972 to your computer and use it in GitHub Desktop.
Save frenchy64/11355972 to your computer and use it in GitHub Desktop.
juxt.clj
(All [b1 ...]
(All [x r b2 ...]
(Fn [[b1 ... b1 -> b2] ... b2 -> [b1 ... b1 -> '[b2 ... b2]]]
[[b1 ... b1 -> r] * -> [b1 ... b1 -> (Vec r)]]
[[x * -> b2] ... b2 -> [x * -> '[b2 ... b2]]]
[[x * -> r] * -> [x * -> (Vec r)]])))
@frenchy64
Copy link
Author

Some instantiations:

; first arity
[[Number -> Boolean] [Number -> Symbol] -> [Number -> '[Boolean Symbol]]]

;second arity
[[Number -> Boolean] * -> [Number -> (Vec Boolean)]]

;third arity
[[Number * -> Boolean] [Number * -> Symbol]  -> [Number * -> '[Boolean Symbol]]]

;forth arity
[[Number * -> Boolean] *  -> [Number * -> (Vec Boolean)]]

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