Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
...
  • 2 commits
  • 2 files changed
  • 0 commit comments
  • 1 contributor
Showing with 21 additions and 3 deletions.
  1. +20 −2 README.md
  2. +1 −1 project.clj
View
22 README.md
@@ -1,10 +1,28 @@
# neurotic
-Get traits in clojure!
+A library to get traits support to clojure's deftype
+
+## Installation
+
+In Leiningen:
+
+```clojure
+:dependencies [[bronsa/neurotic "0.1.0"]]
+```
## Usage
-FIXME
+```clojure
+(ns my-ns
+ (:refer-clojure :exclude [deftype])
+ (:require [neurotic.traits :refer [deftype deftraits]]))
+
+(defprotocol AProtocol (f [_]))
+
+(deftrait AProtocol-trait [foo] (f [_] foo))
+
+(deftype AType [foo] :defaults [AProtocol-traits])
+```
## License
View
2 project.clj
@@ -1,4 +1,4 @@
-(defproject bronsa/neurotic "0.1.0-SNAPSHOT"
+(defproject bronsa/neurotic "0.2.0-SNAPSHOT"
:description "Get traits in clojure"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}

No commit comments for this range

Something went wrong with that request. Please try again.