Skip to content

Instantly share code, notes, and snippets.

@zhouqiang-cl
Last active December 22, 2016 07:55
Show Gist options
  • Save zhouqiang-cl/6f267e095270947251d1244f108eca39 to your computer and use it in GitHub Desktop.
Save zhouqiang-cl/6f267e095270947251d1244f108eca39 to your computer and use it in GitHub Desktop.
common lisp 的函数 INPUT-STREAM-P, OUTPUT-STREAM-P
语法
input-stream-p stream => generalized-boolean
output-stream-p stream => generalized-boolean
参数和值
stream --- 一个 stream
generalized-boolean --- 一个 generalized-boolean
描述
input-stream-p 如果 stream 是一个 input-stream ,返回 true, 否则返回 false
output-stream-p 如果 stream 是一个 output-stream ,返回 true, 否则返回 false
代码
* (input-stream-p *standard-input*)
T
* (input-stream-p *terminal-io*)
T
* (input-stream-p *standard-output*)
NIL
* (output-stream-p *terminal-io*)
T
* (output-stream-p *standard-output*)
T
* (output-stream-p (make-string-input-stream "jr"))
NIL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment