From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/25851 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Anton Shepelev Newsgroups: gmane.text.pandoc Subject: Re: Type of the `filter' argument to traversal functions Date: Wed, 12 Aug 2020 12:32:57 +0300 Message-ID: <20200812123257.14be2d659f808e89ecb7e7f9@gmail.com> References: <20200811220909.e97f97ce8e8dad5d575d90f6@gmail.com> <20200812004617.ec382d94b849e234bbaa6762@gmail.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34055"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBCDNP2MAQEGBBT7OZ34QKGQEBD3FLDI-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Wed Aug 12 11:33:06 2020 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-wr1-f57.google.com ([209.85.221.57]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1k5n86-0008kQ-1a for gtp-pandoc-discuss@m.gmane-mx.org; Wed, 12 Aug 2020 11:33:06 +0200 Original-Received: by mail-wr1-f57.google.com with SMTP id z12sf678651wrl.16 for ; Wed, 12 Aug 2020 02:33:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1597224785; cv=pass; d=google.com; s=arc-20160816; b=CDmbo8vJ11mpfMhAJW+HBOt9Ws3EAIX/01Aj86yl5jOyk/d6du2jxmQMnaJ9QRItYA yQajF5fOj6Pr/kRfNW3w2yQJOpLeo+zOGf3oK3RNWV5P8JVYB9SJT7LimI2vb8NAXR5l EidMjc/Q5dhol42i6WFnLpkl+VAaKXSF6e71GMS2kiFQH2GKL3//517itcGpg6fxvx8N m7vy7/ez9w8oPKMTszp4afoD2tQDopamUeuDpe7+m1NyAtVJsHowpJJsRt78q2StoK8B LKhRwbHD2HXWojIsvn+fdfyEYziHl79kieLmbaX8r2RyM5J6gIu92U6ofef1VacPTQ5Z +3Lg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:mime-version:references :message-id:date:subject:from:to:sender:dkim-signature; bh=TqxPIT+Gx2GU4ZoVWIn3g4/4YvhvWbouYZI2p7eM3+4=; b=m9ZdyDaKg3HLzDk7T/3gnSW9UFzx9TzoFQo1S6EUamkyvIFDvYMAhLPz6HdOo4szs+ f9H/YJ0zoG4y+Da2tJc7LMh7R+y8nuOwYzLaG+IlbZunbSPQbjkM+46pAiQqASayksZ9 +FCptc9S7pZy1cRC+4VH8vTgTKDRSsmCNEkji2R2GPJQxCKPcolgnsQR44TxUuBKvCm9 z8+f7k4mY9psGdszSM1heq2ZEjagrHWaoi2gcXXkr1dAJS066qWYMv9XyOiKFSBw1ti5 hqEraZ43foe8q4CXC1AnP4+SrJm4sq5y9JjfhvHZo/xnoLPSOiUsiMF+CTNQln1wSGOl c5jw== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of gtp-pandoc-discuss@m.gmane-mx.org designates 116.202.254.214 as permitted sender) smtp.mailfrom=gtp-pandoc-discuss@m.gmane-mx.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:to:from:subject:date:message-id:references:mime-version :x-original-sender:x-original-authentication-results:reply-to :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=TqxPIT+Gx2GU4ZoVWIn3g4/4YvhvWbouYZI2p7eM3+4=; b=FxnblEplhWTV95BSDCwVtEltT7bVgM1eKEfiKpJFrKx9bKpTlaCfByCIEeJqt0YoTS BKQhdCT39mfnwjL5dwiEeKbQwzAizD9PACj3469bwgTFJ2nNPhaTM5IXR6FLmXwDEE5Y mFw4TKow5Zb8T/oZGE7kgtH0sAAdliWkrwSgD6XoLIEeKQf34LSUg4fO5uVqjiMkJsOt hQgxSEspw40DV1xzADg/8xhMdnfkZ3HqNIRoU/tvwoeEsr22+2VEuA0It89AKAms1B6r T/yBvWEEt0eZVEOlW0olAA1bFhMYMbcPaXPg8qJvHtl12Feb8KcFxj4huOGsf0uWYN1u +sbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:to:from:subject:date:message-id :references:mime-version:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=TqxPIT+Gx2GU4ZoVWIn3g4/4YvhvWbouYZI2p7eM3+4=; b=Z5LAjqury0Oys/yepwZb1zG4H2h8koJn8XRrAFxZStfdNHONdcN0zgX80lpnOmwYYY XIJK4z7QfMWF9h7PXglAnMca/Q3mlC/xVxKOf/hifgUytHLYnSixQ3tmWlyq1kp/tMRZ rG7Rg8zXVHX7SYJgWdhHPUvQYIf5Z27rDyO1OEaM0MnF3Q+StIhJJbrZ9WlQ+NOqBay5 e4m9xWXkuQOT8UiGJMijsuusi+iVMkWsBkGv+DVP3DIHM1s3F4RSwUW621s+jYrqVu1S CV5zgoCuoxV9VHobSBGCDJnIEmZucMU7EudTcGIVpeQ6Y0Fan/rKl8f+f4y1uigvT+AC hCMg== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM533C7Z673RwGonFyXRPtdmcboTqjC2G4V7coVq7isshbteY7gGUz OEl06hP8Dh+6z0Q3D/c8YLs= X-Google-Smtp-Source: ABdhPJxgFiGSpa9zqTg+dDEiPXhgpGE/zOk7fqgtfI/JgprEF9byjSi0q/UzcY8ddx2guq34Kax0BA== X-Received: by 2002:a05:600c:2215:: with SMTP id z21mr8246652wml.159.1597224785808; Wed, 12 Aug 2020 02:33:05 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a7b:c304:: with SMTP id k4ls669510wmj.1.gmail; Wed, 12 Aug 2020 02:33:02 -0700 (PDT) X-Received: by 2002:a7b:cb47:: with SMTP id v7mr8301084wmj.129.1597224782864; Wed, 12 Aug 2020 02:33:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597224782; cv=none; d=google.com; s=arc-20160816; b=Me/gP6+NBP0cW0tG9Y6q7ShMVWUR6iUTMa7S8vkHKTxJtZd1ip1dQqAEJPK4R35/cm 6oFSD+S/mD0+qxXIfqr4leMKfOldHHRGLzk5WUtclEM6i7vvXOsnH55M80SaTXJWXQlq YeKsI3xXB5j3BRK7NgynysxwGqgUpqZ6FYSBsU63LQZrV9mNW0v1Nl9kQTVQeYDVNkrA 9Mm/dlj7CcLRwMQmLjMhogxqBn8LmN+mN8IiVVAbo95A+Pa9MVncJYtBGX4lG4Pkfgx7 nZZejfAhNvaNysCJ1A9UT3XQUW9x2g3MhJww8/fUmX4c3kz9jPrVI5Gy6B6pNpR2uvNK gZiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:message-id:date :subject:from:to; bh=Gvf85xet4uozdN/fJxfQVOr2yWmO+pAgtP6f2r8o+e0=; b=HfXevqsypPZ64hBbbiK9lcQTvCoSC0JypCK4pkJ25iQRZ1l4i96E8dy2hJkZ2sCRYY MjQMTrRX/KAFjGRjJuz2mD+vUKxVbZTYRj5HJ9hT071TbL4WfQlUlw8WaOXckYnHuJ2j V/kVz5BFISxmHopn306dADSrzV/S6KF6kVIzlcQFNALtw8PllWBI5J0zahy/EzPJOkR4 LOBoZOk0t764L8jMgvcaI9K5gT9G9iPeYjnju++sw8pzZvuEls3O+K/fWW5cDWpRqpp0 AwYjk4DyvwpOW/a9j4x6A4N3iT2GHIAjN0RWEAWZ4tOgCZi07AbYMmGJcTklwm7vymDE zmGQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of gtp-pandoc-discuss@m.gmane-mx.org designates 116.202.254.214 as permitted sender) smtp.mailfrom=gtp-pandoc-discuss@m.gmane-mx.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Original-Received: from ciao.gmane.io (static.214.254.202.116.clients.your-server.de. [116.202.254.214]) by gmr-mx.google.com with ESMTPS id m3si88802wme.0.2020.08.12.02.33.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Aug 2020 02:33:02 -0700 (PDT) Received-SPF: pass (google.com: domain of gtp-pandoc-discuss@m.gmane-mx.org designates 116.202.254.214 as permitted sender) client-ip=116.202.254.214; Original-Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1k5n82-0008en-61 for pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; Wed, 12 Aug 2020 11:33:02 +0200 X-Injected-Via-Gmane: http://gmane.org/ X-Newsreader: Sylpheed 3.5.0 (GTK+ 2.24.23; i686-pc-mingw32) X-Original-Sender: anton.txt-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of gtp-pandoc-discuss@m.gmane-mx.org designates 116.202.254.214 as permitted sender) smtp.mailfrom=gtp-pandoc-discuss@m.gmane-mx.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Precedence: list Mailing-list: list pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; contact pandoc-discuss+owners-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-ID: X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.io gmane.text.pandoc:25851 Archived-At: BPJ: > A note on terminology: Since "table" on its own is > rather ambiguous in Lua may be a good idea to > clarify what kind of data a it given table is sup- > posed to contain by using the terms "array table" > and "map table" and possibly "mixed table" for a > table with both array and map data, which are > sometimes convenient in Lua code, e.g. to tag an > array. That would certanly help such newcomers as I. Has there no standard terminology been developed for the various kinds of Lua table? If not, then I agree than the Pandoc manual should introduce some simple internal terminology, perhaps dependent on usage: array,list: an integer-indexed table map,record: a string-indexed table It makes a Lua filter a map of elements names to processing functions, and the return type of a fil- ter script an array of such maps, the `Header' ele- ment a record with fields `level', `content', &c. I have not encountered what you call "mixed tables", but I think they would be records with two fields: one an array and the other a map... -- Please, do not forward replies to the list to my e-mail.