Mercurial > lasercutter
diff src/clojure/test_clojure/protocols/examples.clj @ 10:ef7dbbd6452c
added clojure source goodness
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Sat, 21 Aug 2010 06:25:44 -0400 |
parents | |
children |
line wrap: on
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/src/clojure/test_clojure/protocols/examples.clj Sat Aug 21 06:25:44 2010 -0400 1.3 @@ -0,0 +1,14 @@ 1.4 +(ns clojure.test-clojure.protocols.examples) 1.5 + 1.6 +(defprotocol ExampleProtocol 1.7 + "example protocol used by clojure tests" 1.8 + 1.9 + (foo [a] "method with one arg") 1.10 + (bar [a b] "method with two args") 1.11 + (^String baz [a] [a b] "method with multiple arities") 1.12 + (with-quux [a] "method name with a hyphen")) 1.13 + 1.14 +(definterface ExampleInterface 1.15 + (hinted [^int i]) 1.16 + (hinted [^String s])) 1.17 +