Created
December 21, 2016 08:44
-
-
Save zhouqiang-cl/df605e75a37851f8a60d6a08209131b7 to your computer and use it in GitHub Desktop.
common lisp 的函数 COERCE
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
语法 | |
coerce object result-type => result | |
参数和值 | |
object --- 一个 object | |
result-type --- 一个类型指示符 | |
result --- 一个 object, result-type 类型 | |
描述 | |
强制将 object 转换成 result-type 类型 | |
代码 | |
* (coerce '(a b c) 'vector) | |
#(A B C) | |
* (coerce 'a 'character) | |
#\A |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment