Greg Hendershott
unread,Nov 30, 2018, 9:25:58 AM11/30/18Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Robby Findler, Philip McGrath, Gustavo Massaccesi, John Clements, racket...@googlegroups.com
On Fri, Nov 30, 2018 at 5:58 AM Robby Findler
<
ro...@eecs.northwestern.edu> wrote:
> What about using the function
>
> (lambda (x) (and x #true))
>
> And putting a short discussion of truthy and a link to elsewhere in the docs?
Yeah. I feel like the `filter-map` doc would be fine with just that change.
Already it tells you `filter-map` is made of `filter` and `map` --
which are already clickable links right there!
I think really it's the `filter` doc that needs improving. It talks
about the pred function returning "a true value". Should it say "any
value except #f"?
(In the User's Guide, the only discussion of "truthy" I can find is
for things like `if`. The discussion is pretty much just "any value
except #f". Truthy is simpler in Racket than some other languages.
That's probably the only discussion needed -- to help people coming
from other langs? The only false value is #f. Everything else --
including 0 '() null -- is true. Right?)