From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Heime Newsgroups: gmane.emacs.help Subject: Passing two sequences to make a list of lists Date: Tue, 08 Nov 2022 06:22:16 +0000 Message-ID: <4oPQf3c2ECktS6pjTAjFaazCdaSiv-o5UokSLuAgiK7rJR-x7fwQnh-zFXKVnxrywei4kiHIwzXQNC92xggBzzKbnYeLPEQMeAQNnlQn8ro=@protonmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23609"; mail-complaints-to="usenet@ciao.gmane.io" To: Heime via Users list for the GNU Emacs text editor Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Nov 08 07:23:20 2022 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1osI12-0005yh-46 for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 08 Nov 2022 07:23:20 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1osI0R-0002hD-5A; Tue, 08 Nov 2022 01:22:43 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1osI0J-0002fG-V3 for help-gnu-emacs@gnu.org; Tue, 08 Nov 2022 01:22:37 -0500 Original-Received: from mail-40141.protonmail.ch ([185.70.40.141]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1osI0F-0004x4-G2 for help-gnu-emacs@gnu.org; Tue, 08 Nov 2022 01:22:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1667888547; x=1668147747; bh=jf6UtmtIX/fSaliwvzL9qbQGpuYFE+u8xJqR31813go=; h=Date:To:From:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=BKSrOsJQkXd+9w5712wel05InSwrIFUCDl1U/mm4k35RypEOTVXfYSk/BGLEAR6fm FzaJZKoVHF9tPMbasEn1IwO2U1odduLHDjwzgcW21M2Xwyon2EPrDdMwBMdIylBLYy Lz1QC05Ib2+k2JCyKVy7KLEMkXD3Th5wnIgG3Vc583FyrRKW11cHzEcJ86m4snd5UK 7wl+fd9KA6Xp64lqbqdBh2ABpjhj0mfSkki/T+rfhzWFaQeJ8ZAQuD6vgdVLvgKM87 qEV2MXsOfFgjIBEmmmgFRuWazYQsg6jQChFSt/9brLqTFgQw/mv3Yzxe4qLqULAFtj 2L/8DsAeFQCoQ== Feedback-ID: 57735886:user:proton Received-SPF: pass client-ip=185.70.40.141; envelope-from=heimeborgia@protonmail.com; helo=mail-40141.protonmail.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:140806 Archived-At: I have constructed the following to make a lists of lists. The purpose is to have a list DESCR of N string elements; and an associated array SELEC= TR, also of N elements but composed of integers. The output would be a list of lists. Each internal list would represent a row in a table. The separate rows (each a list) are then put in a list. Each element of DESCR would be used as the first element of each list. Whilst the corresponding DESCR value would be the number of "xxxxx" blocks in the remaining elements of each list, with the rest being empty strings. = =20 I would also require a numeric value that determines the total number of el= ements=20 in each list, call it M. Thus for DESCR being '("Peter" "Paul"); and SELECTR being [3 2]; and M bein= g 5; one would get '(("Peter" "xxxxx" "xxxxx" "xxxxx" "") ; list of M of 5 elements (Paul" "xxxxx" "xxxxx" "" "")) ; number of "xxxxx" blacks being 2 This is the function I have been playing with (seq-mapn (lambda (x y) (list x (mapconcat =09=09 (lambda (s) =09=09 (prog1 =09=09=09(if (> y 0) (append (make-list s "xxxxx")) "") (setq y (1- y)))) "") " ")) descr selectr)