The manual has the new loop clauses, and the example says level
The manual submodule moves to 1fe22a4: :finish, :abandon, :while, :until and the :subloop form. A :for after a non-:for clause opens a level, which the homepage example now calls it, since a subloop is now the :subloop form. 🤖 Generated with [ECA](https://eca.dev) (anthropic/claude-opus-5-5) Co-Authored-By: eca-agent <git@eca.dev>
This commit is contained in:
parent
5153c1be51
commit
20e6589240
2 changed files with 3 additions and 3 deletions
4
index.sz
4
index.sz
|
|
@ -57,8 +57,8 @@ This sums every line and every char read from stdin. When the port is closed, th
|
|||
(def line-seq (port->seq read-line (deref current-input-port)))
|
||||
(loop (:for line line-seq)
|
||||
(:acc lines (summing 1))
|
||||
;; Any :for after a non-:for clause opens a new subloop
|
||||
;; so this loops over ever char in the line.
|
||||
;; A :for after a non-:for clause opens a new level,
|
||||
;; so this loops over every char in the line.
|
||||
(:for ch line)
|
||||
(:acc chars (summing 1) :when (not (char-whitespace? ch)))
|
||||
=> (show [(tabular [["Lines:" nl "Chars:" nl]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue