Skip to content

hiredman/match

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

# match

provides analogs to fn and defn for functions that pattern match on the actual
parameters to select a body to execute

## Usage

match.core> ((mn [] (println :foo)
                 [?a] (println a)
                 [?a ?b] (println a b)))
:foo
nil
match.core> ((mn [] (println :foo)
                 [?a] (println a)
                 [?a ?b] (println a b)) 1)
1
nil
match.core> ((mn [] (println :foo)
                 [?a] (println a)
                 [?a ?b] (println a b)) [1 2])
[1 2]
nil
match.core> ((mn [] (println :foo)
                 [?a] (println a)
                 [?a ?b] (println a b)) 1 2)
1 2
nil
match.core> 

## License

Copyright (C) 2011 Kevin Downey

Distributed under the Eclipse Public License, the same as Clojure.

About

pattern matching primitives for clojure

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published