Skip to content

Instantly share code, notes, and snippets.

@zhouqiang-cl
Created December 13, 2016 08:37
Show Gist options
  • Select an option

  • Save zhouqiang-cl/18f2190b9a40266b4e7c90c594f45036 to your computer and use it in GitHub Desktop.

Select an option

Save zhouqiang-cl/18f2190b9a40266b4e7c90c594f45036 to your computer and use it in GitHub Desktop.
common lisp 的函数 TYPEP
语法
typep object type-specifier &optional environment => generalized-boolean
参数和值
object --- 一个 object
type-specifier --- 一个 type-specifier
environment --- 一个 environment object, 默认为 nil
generalized-boolean --- 一个 generalized-boolean
描述
如果 object 的类型属于 type-specifier 则返回真, 否则返回假
代码
* (typep 'a 'symbol)
T
* (typep 'a 'number)
NIL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment