Maybe something like this should be included in the stdlib? Small tricks like 
these are handy to have a unified way of doing.

Reply via email to