def-clj

Clojure macros for function definitions.

License

License

GroupId

GroupId

com.github.sebhoss
ArtifactId

ArtifactId

def-clj
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

clojure
Description

Description

def-clj
Clojure macros for function definitions.
Project URL

Project URL

https://github.com/sebhoss/def-clj
Source Code Management

Source Code Management

https://github.com/sebhoss/def-clj

Download def-clj

Dependencies

compile (1)

Group / Artifact Type Version
org.clojure : clojure jar 1.5.1

Project Modules

There are no modules declared in this project.

def-clj

Clojure helper functions for function definitions.

Usage

The namespace com.github.sebhoss.def offers the following functions:

  • (defnk name decls) Defines a keyword-based function
  • (defn* name decls) Defines both Clojure and Java functions (using the standard prefix -). Usefull for Java interoperability.

Example

defnk

(require '[com.github.sebhoss.def :refer :all])

(defnk my-func [:key1 :key2 :key3] ...)
; expandes to: (defn my-func [& {:keys [key1 key2 key3]}] ...)

defn*

(require '[com.github.sebhoss.def :refer :all])

(defn* my-func [params] ...)
; expandes to (defn my-func [params] ...) and (defn -myFunc [params] ...)

Integration

Maven

<dependencies>
  <dependency>
    <groupId>com.github.sebhoss</groupId>
    <artifactId>def-clj</artifactId>
    <version>[1.0.0,2.0.0)</version>
  </dependency>
</dependencies>

Leiningen

[com.github.sebhoss/def-clj "[1.0.0,2.0.0)"]

License

This program is free software. It comes without any warranty, to the extent permitted by applicable law. You can redistribute it and/or modify it under the terms of the Do What The Fuck You Want To Public License, Version 2, as published by Sam Hocevar. See http://www.wtfpl.net/ for more details.

Versions

Version
1.0.0