Skip to content

Instantly share code, notes, and snippets.

@emidln
Created October 8, 2014 22:42
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 emidln/2b3a192b7e7f3d305f94 to your computer and use it in GitHub Desktop.
Save emidln/2b3a192b7e7f3d305f94 to your computer and use it in GitHub Desktop.
(ns foo
(:require [plumbing.core :refer :all]
[schema.core :as s]))
(defprotocol Foo
(foo [this]))
;; this doesn't work, why?
(defnk cant-annotate-output-with-protocol-as-value :- {:foo Foo}
"docstring 1"
[baz :- s/Any])
;; this works
(defnk can-annotate-output-with-protocol :- Foo
"docstring 2"
[baz :- s/Any])
;; this works
(defnk can-annotate-input-with-protocol :- nil
"docstring 3"
[foo :- Foo])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment