Perhaps this would be a hassle for Typed-Racket maintainers, but there are many places where standard Racket library functions return boolean. However, given the non-false nature of almost everything, certainly the code could be doubly useful and half the size while retaining boolean compatibility.
What reminded me of this was some code today: (define (get-glue-library) (or (getenv "GLUELIB") (let ((name "/tmp/somepath.so")) (and (file-exists? name) name)))) If the file-exists? code were to return its file, then it would be (define (get-glue-library) (or (getenv "GLUELIB") (file-exists? "/tmp/somepath.so"))) Then of course the ? suffix might seem less appropriate. This is not a request for change, just an observation at how redundant my effort was to have to save the name of a file (to avoid typos) and to call two functions. At least I do not have to ((let ((name "GLUELIB")) (and (getenv? name) (getenv name))) If I am missing some way to be more succinct while using the standard library calls, I would be appreciative of guidance. Thanks, JG -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.