gugod on Nostr: mauke gave a bunch of nice reviews, and while working on input validation, I wrote ...
mauke gave a bunch of nice reviews, and while working on input validation, I wrote this down:
defined($_[0]) && (reftype($_[0]) // '') eq 'CODE'
... the the fact undef might be returned from reftype() makes me want to use Paul's string equ operator[1] instead:
defined($_[0]) && reftype($_[0]) equ 'CODE'
[1]: https://metacpan.org/pod/Syntax::Operator::Equ
#WIP
#Perl
defined($_[0]) && (reftype($_[0]) // '') eq 'CODE'
... the the fact undef might be returned from reftype() makes me want to use Paul's string equ operator[1] instead:
defined($_[0]) && reftype($_[0]) equ 'CODE'
[1]: https://metacpan.org/pod/Syntax::Operator::Equ
#WIP
#Perl