Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

(foreach <variable> <list> <expression>*)

(foreach <variable> <list> <expression>*)

Sets the named variable to each of the values in the list in turn; for each value, all the other expressions are evaluated in order. The return function can be used to break the iteration. This example uses foreach to print each item in the list:

(foreach ?x (create$ a b c d) (printout t ?x crlf))


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial