3 ms·
Common Lisp can do that CL-USER> (defun non-empty-string-p (string) (and (stringp string) (plusp (length string)))) NON-EMPT
by mtreis86 5y ago
Common Lisp can do that
CL-USER> (defun non-empty-string-p (string)
(and (stringp string)
(plusp (length string))))
NON-EMPTY-STRING-P
CL-USER> (deftype non-empty-string ()
`(satisfies non-empty-string-p))
NON-EMPTY-STRING
CL-USER> (typep "" 'non-empty-string)
NIL
CL-USER> (typep " " 'non-empty-string)
T
- scns 5y agoMumble, Greenspun, smthing somethng