简体   繁体   中英

What's the equivalent of Clojure's “do” in Common Lisp?

也就是说,按顺序评估子表单并返回最后评估值的表单,例如

(do (println "Hello World") 3) => 3

It's called progn .

Special Operator PROGN

Syntax:

progn form * ⇒ result *

Description:

progn evaluates forms , in the order in which they are given.

The values of each form but the last are discarded.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM