From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Linus_Bj=C3=B6rnstam?= Newsgroups: gmane.lisp.guile.user Subject: guile-threading-macros Date: Fri, 03 May 2019 08:33:31 -0400 Message-ID: <2a7ea180-ef85-4b14-aea5-f6ed68295952@www.fastmail.com> Mime-Version: 1.0 Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="15721"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Cyrus-JMAP/3.1.6-449-gfb3fc5a-fmstable-20190430v1 To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Fri May 03 23:18:33 2019 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hMfZY-0017On-Ce for guile-user@m.gmane.org; Fri, 03 May 2019 23:18:25 +0200 Original-Received: from localhost ([127.0.0.1]:39940 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hMXNS-0001Ii-6b for guile-user@m.gmane.org; Fri, 03 May 2019 08:33:22 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:49542) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hMXMs-0001Hy-MT for guile-user@gnu.org; Fri, 03 May 2019 08:32:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hMXMr-00077L-G3 for guile-user@gnu.org; Fri, 03 May 2019 08:32:46 -0400 Original-Received: from out5-smtp.messagingengine.com ([66.111.4.29]:34381) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hMXMr-00073u-69 for guile-user@gnu.org; Fri, 03 May 2019 08:32:45 -0400 Original-Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 23CB821FBF for ; Fri, 3 May 2019 08:32:43 -0400 (EDT) Original-Received: from imap1 ([10.202.2.51]) by compute1.internal (MEProxy); Fri, 03 May 2019 08:32:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.se; h= mime-version:message-id:date:from:to:subject:content-type :content-transfer-encoding; s=fm3; bh=sgZPjYO7RNTkrVJq8E06r7Ci0D 03gDrqk7Dz5JWiENk=; b=Ne4/MDclxq9IfvLL+1StrTotmSGrQ+lxOmxjw4+UVV jJ7loccqe12T7MimzSEZPegqdlna/j17v7ow7Bjy5DV8Z6xKT78F6QSskBXQp/8k x4s6VU6sQk8tPog7Zo9bufRqsxOqzPPCD0akxx7UiHKam/pOocpzSqqfv108axYc dAQidDOeaLIZ8cbNC3q0Q9uLKzY/2+t7hNX/p+DVgZkRX56LPcxg2I/nKdv2HP3m r5zoo829KgwO2S69bj/XYJjeNsaRA8FykWV7U9LByC4zqn64iLjUTAnRxwEftXQi U1r65JXtVgWyqEcrLErNh+/C0vmz/57QrubVnLiv+h4Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=sgZPjY O7RNTkrVJq8E06r7Ci0D03gDrqk7Dz5JWiENk=; b=VuxW63LZ8ODqBjoDXwFzs4 Pyz3JVTHChVMYZsJAdXgg0GvVb5pwFAlVnfxB17DzAvMLuLVbu4m7pkKhPlXVLCc UwmGz6HExhFMNs3ByKBf1o+LOk4H0GbAyIy6NhY6ITNoc42TlE3oeakt74vBOcT9 BMhD5gv1OEWXtSfsQtPF13ndbSGXxxz5fCK2SfL3YzBxFGmymsnYaO/8ESy9BP3B zAYXwOQSXJrETM2QAYRlKi7lLmYFPU+FiR9+lhoN4CQNSpv37CPwBWrgrP/yBFDe Q3NuIrjyhZFGXhDq2S825/MqnM7y/Q6Qk3ke6fJfldKfnR9Ikej/BpmzYReHy/kw == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduuddrjedugdehiecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepofgfggfkfffhvffutgfgsehtqhertd erreejnecuhfhrohhmpefnihhnuhhspgeujhpnrhhnshhtrghmuceolhhinhhushdrihhn thgvrhhnvghtsehfrghsthhmrghilhdrshgvqeenucffohhmrghinhepsghithgsuhgtkh gvthdrohhrghenucfrrghrrghmpehmrghilhhfrhhomheplhhinhhushdrihhnthgvrhhn vghtsehfrghsthhmrghilhdrshgvnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Original-Received: by mailuser.nyi.internal (Postfix, from userid 501) id B8522D4938; Fri, 3 May 2019 08:32:42 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 66.111.4.29 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.org gmane.lisp.guile.user:15441 Archived-At: HELLO-FELLOW-GUILERS I wrote some threading macros ages ago that I never properly released. T= hey are clojure-like threading macros but with cut-like placeholders.=20= A simple example would be ~> (left insert, when no <> placeholder is fou= nd): (~> (list "hello" "fellow" "guilers") (map string-upcase <>) (string-joi= n "-")) =3D> "HELLO-FELLOW-GUILERS". Other forms are also provided: and~> stops when any intermediate value is #f lambda~> threading lambda (lambda~> ...) is the same as (lambda (id) (~>= id ...)) define~> (define~> id ...) is the same as (define id (lambda~> ...)) https://bitbucket.org/bjoli/guile-threading-macros Best regards=20 Linus Bj=C3=B6rnstam