Cool idea. Do any other languages have this?
user=> (doc clojure.core)
-------------------------
clojure.core
Fundamental library of the Clojure language
user=> (doc +)
-------------------------
clojure.core/+
([] [x] [x y] [x y & more])
Returns the sum of nums. (+) returns 0. Does not auto-promote
longs, will throw on overflow. See also: +'
user=> (source +)
(defn +
"Returns the sum of nums. (+) returns 0. Does not auto-promote
longs, will throw on overflow. See also: +'"
{:inline (nary-inline 'add 'unchecked_add)
:inline-arities >1?
:added "1.2"}
([] 0)
([x] (cast Number x))
([x y] (. clojure.lang.Numbers (add x y)))
([x y & more]
(reduce1 + (+ x y) more))) > (help +)
Arguments N arg1..argN
Adds all arguments present to the first number.
> (help map)
Arguments lst:list fun:function
Return a list with the contents of evaluating the given function on every item of the supplied list.
See-also: map-pairsSimilarly, rtop for reason.
https://opam.ocaml.org/blog/about-utop/ and https://opam.ocaml.org/packages/rtop/
dbuenzli's down also has a similar feature.