bug#71684: [PATCH v2] doc: Document the peek and pk procedures.

Simon Tournier <[email protected]>
Newsgroups gmane.lisp.guile.bugs
Message-ID <[email protected]>
Hi Maxim,

On Wed, 10 Jul 2024 at 15:48, Maxim Cournoyer <[email protected]> wrote:

> I think I'd prefer more simple examples than a single more complicated
> one, if we go that route.  I think the text explained 'peek' clearly
> already, though, so I personally would opt to leave it as is, especially
> since adding a 'begin' block to showcase multiple 'pk' calls goes
> against the merit of peek of being least intrusive (it prints then
> returns the value, so the code structure needs not be changed).

Well, I do not have a strong opinion on the topic. :-)

I would suggest to apply the ’pk’ on the other branch, something as:

--8<---------------cut here---------------start------------->8---
(map (lambda (v)
       (if (number? v)
           (pk 'number v (number->string v))
           v))
     '(1 "2" "3" 4))
--8<---------------cut here---------------end--------------->8---


Cheers,
simon
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.