Skip to content

Instantly share code, notes, and snippets.

@zhouqiang-cl
Created December 3, 2016 04:42
Show Gist options
  • Save zhouqiang-cl/bb936e5217d2e8ceb475c00748d168bc to your computer and use it in GitHub Desktop.
Save zhouqiang-cl/bb936e5217d2e8ceb475c00748d168bc to your computer and use it in GitHub Desktop.
common lisp 的函数 MAKE-SEQUENCE
语法
make-sequence result-type size &key initial-element => sequence
参数和值
result-type --- 序列的类型
size --- 一个正整数
initial-element --- 一个object
描述
返回一个result-type 类型的序列, 其大小为size, 每一个元素被初始化为 initial-element
代码
* (make-sequence 'list 0)
NIL
* (make-sequence 'string 26 :initial-element #\.)
".........................."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment