Skip to content
/ defm Public

A small Clojure library designed to provide a simple pattern matching defn-like construct called defm.

License

Notifications You must be signed in to change notification settings

coltnz/defm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

defm

A Clojure library designed to provide a simple pattern matching defn-like construct called defm.

Defm dispatches on parameter type and value as well as number of parameters

Usage

(defm file-or-string-fn []
  ([File] (println "It's a file"))
  ([s :- String] (println "It's a string " s))
  (["magic"] (println "It's magic"))
  ([_] (println "It's a " (type _1))))

License

Copyright © 2014 Colin Taylor

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.

About

A small Clojure library designed to provide a simple pattern matching defn-like construct called defm.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published