Merge pull request #655 from Foxboron/fix-defmulti-docs

Fixed defmulti example to be streamlined
This commit is contained in:
Berker Peksag 2014-09-08 18:05:01 +03:00
commit 28c046c180

View File

@ -11,13 +11,13 @@ args and/or kwargs. Inspired by clojures take on `defn`.
=> (require hy.contrib.multi) => (require hy.contrib.multi)
=> (defmulti fun => (defmulti fun
... ([a] a) ... ([a] "a")
... ([a b] "a b") ... ([a b] "a b")
... ([a b c] "a b c")) ... ([a b c] "a b c"))
=> (fun 1 2 3)
'a b c'
=> (fun a b)
"a b"
=> (fun 1) => (fun 1)
1 "a"
=> (fun 1 2)
"a b"
=> (fun 1 2 3)
"a b c"