Describe non-printing of returned nil [skip ci] (#514)

This commit is contained in:
Graham Carlyle 2020-07-27 19:26:05 +01:00 committed by GitHub
parent c180b5a717
commit 01f2a94117
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -782,6 +782,18 @@ with `lein repl`:
(nrepl-eval 52054 "(+ 1 2 3)") ;;=> "6"
```
## Printing returned values
Babashka doesn't print a returned `nil` as lots of scripts end in something side-effecting.
``` shell
$ bb '(:a {:a 5}'
5
$ bb '(:b {:a 5}'
$
```
If you really want to print the nil, you can use `(prn ..)` instead.
## Differences with Clojure
Babashka is implemented using the [Small Clojure