dg
dg copied to clipboard
Misguide in documentation (return values)
There is a misguide in documentation:
This function is obviously expected to return 4
(as the first line in the screenshot says) but the function name (definitely_not_4
) is misleading:
definitely_not_4 = x ->
x + 2
4
print <| definitely_not_4 40 #=> not 4
and it definitely returns 4
:
...in contrast with the function name.
I think that was supposed to be humor...
...a little bit too much humor for a documentation. I just got it :rofl:
Yeah, the tutorial is supposed to be a bit tongue-in-cheek, as the fake O'Reilly cover might suggest. Kind of hints that the project is not particularly serious, no? (Probably didn't age well, though.)