Recent REPL Values

This post will look at a few dynamic vars to look at recent return values in the Clojure REPL.

 

user=> (+ 0 3)
3
user=> (+ 0 2)
2
user=> (+ 0 1)
1
user=> *1
1
;; the return values of these dynamic vars are themselves return values
;; so be careful
user=> *2
1
user=> *3
1
user=> (+ 0 2)
2
user=> *1
2
user=> *3
1
user=> (+ 2 2)
4
user=> *1
4
user=> (+ 2 2)
4
user=> (+ 2 3)
5
user=> *2
4
user=> (+ 2 3)
5
user=> *1
5

You’re welcome.

There are 51 words in this article.