Guest User

Untitled

a guest
Aug 18th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. In common-lisp how is the relation between types defined?
  2. (subtypep 'string '(array character)) ==> NIL, T
  3. (subtypep '(array character) 'string) ==> NIL, T
  4.  
  5. (typep (make-string x) '(array character)) ==> T
  6. (typep (make-array x :element-type :character) 'string) ==>T
  7.  
  8. ccl e$ rlwrap ./dx86cl64
  9. Loading ~/ccl-init.lisp
  10. Welcome to Clozure Common Lisp Version 1.7-dev-r14614M-trunk (DarwinX8664)!
  11. ? (subtypep 'string '(array character))
  12. T
  13. T
  14. ?
  15.  
  16. (subtypep 'base-string 'array) => T
  17. (subtypep 'base-string '(array base-char)) => T
  18. (subtypep 'string 'array) => T
  19. (subtypep 'string '(array character)) => NIL
  20. (subtypep 'string '(array base-char)) => NIL
  21. (subtypep 'string '(array standard-char)) => NIL
  22. (subtypep 'string '(array extended-char)) => NIL
  23.  
  24. (subtypep '(vector nil) 'string)
Add Comment
Please, Sign In to add comment