/defexample

A macro for defining code examples

Primary LanguageClojureThe UnlicenseUnlicense

Clojars Project

Introduction

A library that provides two macros, defexample and defexamples, for annotating functions with code examples, similar to the way clojure.spec annotates functions with specs using fdef.

See the defexample Dynadocs for more information! These docs were generated by using these macros to define examples of themselves.

Usage

You can include this library in your project dependencies using the version number in the badge above.

To experiment with this library in a REPL, you can use the Clojure CLI tool. In this directory, run clj to start a Clojure REPL, or clj -m cljs.repl.node to start a ClojureScript REPL. When the REPL is up, enter the main namespace with (require 'dynadoc.example) (in-ns 'dynadoc.example).

Licensing

All files that originate from this project are dedicated to the public domain. I would love pull requests, and will assume that they are also dedicated to the public domain.