Skip to content

Torvaney/reprex-clj

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

reprex

travis status code coverage

Prepare reproducible example (reprexes) for posting to GitHub issues, StackOverflow, or Slack snippets.

This is a clojure port of the tidyverse/reprex package for R.

Usage

Use the reprex function to easily capture expressions and their outputs.

With no arguments, reprex will read code from the clipboard:

user=> (require '[reprex.core :refer [reprex]])
nil
user=> (println (reprex))
``` clojure
(+ 1 1)
; => 2

(* 5 5)
; => 25
```

<details><summary>Session info</summary>

```
Clojure version:
	1.8.0
Java version:
	java version "1.8.0_102"
	Java(TM) SE Runtime Environment (build 1.8.0_102-b14)
	Java HotSpot(TM) 64-Bit Server VM (build 25.102-b14, mixed mode)
```

</details>

Created by [reprex](https://github.com/Torvaney/reprex-clj)
nil
user=>

Alternatively, you can supply expressions as arguments:

user=> (->> (reprex (+ 1 1) (* 5 5)) println)

This GitHub-flavored Markdown is then ready to be copied and pasted. When rendered, it looks like this:

(+ 1 1)
; => 2

(* 5 5)
; => 25
Session info
Clojure version:
	1.8.0
Java version:
	java version "1.8.0_102"
	Java(TM) SE Runtime Environment (build 1.8.0_102-b14)
	Java HotSpot(TM) 64-Bit Server VM (build 25.102-b14, mixed mode)

Created by reprex

About

Reproducible examples for clojure

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published