unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Heime <heimeborgia@protonmail.com>
To: Michael Heerdegen <michael_heerdegen@web.de>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Elisp Reference Manual on inserting tables
Date: Tue, 08 Nov 2022 04:09:33 +0000	[thread overview]
Message-ID: <sgzv-4_QaivJOLjBX7UOTx-kxuR-Yj9cAGj5e83o-feieEp4Jy5PgOFhadeH_wK5H-6bHq8VObhYjmdM77VhVoUk39AI_MurBpx5kvsfVHg=@protonmail.com> (raw)
In-Reply-To: <878rkmlb9s.fsf@web.de>

------- Original Message -------
On Monday, November 7th, 2022 at 9:12 PM, Michael Heerdegen <michael_heerdegen@web.de> wrote:


> Heime heimeborgia@protonmail.com writes:
> 
> > > `cl-mapcar' allows to map over multiple sequences. Alternatively use nested` mapcar' calls.
> > 
> > There is also the possibility of using mapcar*
> 
> 
> That's only the old, now obsolete, name of `cl-mapcar'.
> 
> Michael.


Have been focusing on this implementation.  But I have to gen rid of the 
split-string part in mapconcat.  Have found that I can use seq-mapn to 
iterate over two sequences simultaneously.  Then use mapconcat to make the 
string, and use y (from the selectr sequence) as a counter in the function
argument. There exists the convenient "prog1" that makes it possible to 
lower the counter after the "if" form, but return the value of the "if" 
form (the first function in the prog1 body).

(chart-struct '("Peter" "Paul") [3 2])

(defun chart-struct (descr selectr)
  "TODO."

  (seq-mapn
     (lambda (x y)
       (list x (mapconcat
		  (lambda (s)
		    (prog1
			(if (> y 0) (append (make-list y "xxxxx")))
                      (setq y (1- y))))
		  (split-string "|||" "" t))
             (append (make-list y ""))))
     descr
     selectr))




  reply	other threads:[~2022-11-08  4:09 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-04 16:04 Elisp Reference Manual on inserting tables Christopher Dimech
2022-11-04 16:39 ` Eric S Fraga
2022-11-04 17:07   ` Christopher Dimech
2022-11-05 12:57     ` Fraga, Eric
2022-11-06  4:18       ` Heime
2022-11-06 20:48         ` Michael Heerdegen
2022-11-07  6:23           ` Jean Louis
2022-11-07 16:05             ` Michael Heerdegen
2022-11-07 16:49               ` Emanuel Berg
2022-11-08 15:57                 ` Michael Heerdegen
2022-11-07  7:24           ` Heime
2022-11-07 12:32             ` Emanuel Berg
2022-11-07 13:53               ` Heime
2022-11-07  7:32           ` Heime
2022-11-07 18:02             ` Michael Heerdegen
2022-11-07 18:07               ` Heime
2022-11-07 18:10               ` Heime
2022-11-07 21:12                 ` Michael Heerdegen
2022-11-08  4:09                   ` Heime [this message]
2022-11-08  4:12                     ` Emanuel Berg
2022-11-08 16:06                       ` Heime
2022-11-08 20:38                         ` Jean Louis
2022-11-09  0:49                         ` Emanuel Berg
2022-11-08 22:49                     ` Michael Heerdegen
2022-11-04 20:26   ` Heime
2022-11-04 16:43 ` Akib Azmain Turja
2022-11-05 19:37   ` Emanuel Berg
2022-11-06  6:48   ` Jean Louis
2022-11-06  8:31     ` Heime
2022-11-06  9:48       ` Jean Louis
2022-11-06 10:12         ` Heime
2022-11-06 12:26           ` Jean Louis
2022-11-06 12:54             ` Heime
2022-11-06 13:01               ` Emanuel Berg
2022-11-06 14:48                 ` Heime
2022-11-06 15:20                   ` Emanuel Berg
2022-11-07  5:38                   ` Jean Louis
2022-11-07  7:05                     ` Heime
2022-11-07  7:35                       ` Jean Louis
2022-11-07  5:37               ` Jean Louis
2022-11-08  6:39       ` rcd-box.el for box drawings and tables Jean Louis
2022-11-08  7:58         ` Heime
2022-11-08 12:29           ` Jean Louis
2022-11-08 15:29             ` Heime
2022-11-08 20:31               ` Jean Louis
2022-11-08 15:42           ` Jude DaShiell
2022-11-08 20:33             ` Jean Louis
2022-11-09  3:34               ` Jude DaShiell
2022-11-09  4:03                 ` Jean Louis
2022-11-09  4:28                   ` Emanuel Berg
2022-11-10  6:07                     ` Jean Louis
2022-11-10 18:22                       ` Emanuel Berg
2022-11-11 22:28                         ` [External] : " Drew Adams
2022-11-08  9:49         ` Emanuel Berg
2022-11-08 11:54           ` Jean Louis
2022-11-09  0:52             ` Emanuel Berg
2022-11-09 15:48               ` Jude DaShiell
2022-11-10 13:02                 ` Jean Louis
2022-11-10 13:13                   ` Jude DaShiell
2022-11-10 14:13                     ` Jean Louis
2022-11-09 15:49               ` Jude DaShiell
2022-11-09 16:03                 ` Emanuel Berg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='sgzv-4_QaivJOLjBX7UOTx-kxuR-Yj9cAGj5e83o-feieEp4Jy5PgOFhadeH_wK5H-6bHq8VObhYjmdM77VhVoUk39AI_MurBpx5kvsfVHg=@protonmail.com' \
    --to=heimeborgia@protonmail.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=michael_heerdegen@web.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).