Merge pull request #655 from Foxboron/fix-defmulti-docs
Fixed defmulti example to be streamlined
This commit is contained in:
commit
28c046c180
@ -11,13 +11,13 @@ args and/or kwargs. Inspired by clojures take on `defn`.
|
||||
|
||||
=> (require hy.contrib.multi)
|
||||
=> (defmulti fun
|
||||
... ([a] a)
|
||||
... ([a] "a")
|
||||
... ([a b] "a b")
|
||||
... ([a b c] "a b c"))
|
||||
=> (fun 1 2 3)
|
||||
'a b c'
|
||||
=> (fun a b)
|
||||
"a b"
|
||||
=> (fun 1)
|
||||
1
|
||||
"a"
|
||||
=> (fun 1 2)
|
||||
"a b"
|
||||
=> (fun 1 2 3)
|
||||
"a b c"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user