From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Chris Marusich Newsgroups: gmane.lisp.guile.user Subject: Multiple values passed as single argument to procedure Date: Sun, 11 Jun 2017 00:56:23 -0700 Message-ID: <87mv9fnejc.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Trace: blaine.gmane.org 1497167814 20911 195.159.176.226 (11 Jun 2017 07:56:54 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 11 Jun 2017 07:56:54 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Sun Jun 11 09:56:50 2017 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dJxju-0005Gd-M9 for guile-user@m.gmane.org; Sun, 11 Jun 2017 09:56:50 +0200 Original-Received: from localhost ([::1]:33145 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dJxk0-00018K-1f for guile-user@m.gmane.org; Sun, 11 Jun 2017 03:56:56 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51929) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dJxje-00018F-55 for guile-user@gnu.org; Sun, 11 Jun 2017 03:56:34 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dJxjd-0002BA-AY for guile-user@gnu.org; Sun, 11 Jun 2017 03:56:34 -0400 Original-Received: from mail-pg0-x244.google.com ([2607:f8b0:400e:c05::244]:35258) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dJxjd-0002Ar-4b for guile-user@gnu.org; Sun, 11 Jun 2017 03:56:33 -0400 Original-Received: by mail-pg0-x244.google.com with SMTP id f127so11586412pgc.2 for ; Sun, 11 Jun 2017 00:56:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:user-agent:mime-version; bh=uj6ZhaVsAbgtTRGJwgfzUpieoeuaoYpb4XFcIVrz/3g=; b=NCrSu0jEbs93WdO0s2Y6BQDlRYxAOKz0yoOFEijq1UGyKum3YnBw664luhzU8qa1xy +XMPv+4cJ+rkrKlX4PLD3UKK7UOkTiQuphfJP7bv3orq5jiOywE9l9PvLCcFwYiOlUql s7Fd6Z2K+75VWPYLwT5jIGonIU0CIAbQE54ETo1ETZZjrgBwG+u84eG3ONUWuMLiaJ9b 9YSpXpIsbP5n4ZAMFDss+oBSGjymPR6YX7cMQUWmaPIbwlBtN0IyzbGs6+W0hEvREE0U G03VTzdDJqD8cNADpGfVDkkQtwyhDmuypX4qvDep8BzSrzYwhDursIcXYZsLtQi0jRvE gNXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:user-agent :mime-version; bh=uj6ZhaVsAbgtTRGJwgfzUpieoeuaoYpb4XFcIVrz/3g=; b=UKitbhaaB0G3tVkckndaKdkbbd88FDD6/oHTgBwCp4lGdVNY/oI56yrGR2eftht0Rz Ocj0NLizjnU7Br+Ccj3Sv1wNzgrf5jHVDMSo3v/2VKRMTHWRyAAi5P2XGVN9ddKKeMdP WtP0ZNLZREoLggy8X5bfbLo9y7FrxAKCp3vJPOhVSFTHjFgRLs1lz8S/FID9cY2RQd1D 4ecUaATs1w9L8IImEEG1PjyEMtQihGN8fBAnQiGgBdajxsqWaMoN8HOOs3o1g7CQsRvx H8bvC/0Bn+9BgMIO5KPxmQ9rFyEovhAgK42S4LK1zMI2HoBQfv5VhTeRS3ZwxXZP3uoL qm5w== X-Gm-Message-State: AODbwcASZT8KjbmLge2jyIBNuqe7MqYgZIAEO9RqTwtL7H+jvaPhR8/y DFUIYYDtFyNv36jl X-Received: by 10.98.80.140 with SMTP id g12mr19398107pfj.146.1497167790144; Sun, 11 Jun 2017 00:56:30 -0700 (PDT) Original-Received: from garuda ([2601:602:9d02:4725:4e0f:6eff:fef6:70b9]) by smtp.gmail.com with ESMTPSA id z79sm8430182pfi.43.2017.06.11.00.56.28 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 11 Jun 2017 00:56:28 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c05::244 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:13802 Archived-At: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi, I've noticed that when one passes multiple values as a single argument to a procedure, only the first value gets used. Is this expected? Here's an example: =2D-8<---------------cut here---------------start------------->8--- $ guile GNU Guile 2.2.2 Copyright (C) 1995-2017 Free Software Foundation, Inc. Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'. This program is free software, and you are welcome to redistribute it under certain conditions; type `,show c' for details. Enter `,help' for help. scheme@(guile-user)> (define (proc x) x) scheme@(guile-user)> (proc (values 1 2)) $1 =3D 1 scheme@(guile-user)>=20 =2D-8<---------------cut here---------------end--------------->8--- I've looked in a few places to try to figure out the answer to this question, but I haven't found much. In addition to the guile-devel and guile-user email list archives, I've checked the following sections in the manual: (guile) Binding Multiple Values (guile) Lambda (guile) Fly Evaluation (guile) Compiled Procedures (guile) Expression Syntax However, I did find the following information in R6RS (Section 5.8: "Multiple return values"), which seems possibly relevant: "Not all continuations accept any number of values. For example, a continuation that accepts the argument to a procedure call is guaranteed to accept exactly one value. The effect of passing some other number of values to such a continuation is unspecified." =2D-=20 Chris --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEy/WXVcvn5+/vGD+x3UCaFdgiRp0FAlk896cACgkQ3UCaFdgi Rp2GBw/9GXkMyz20rHdt6tfakKkrpRd6GnaKpUFXfLTHEjGHcyNxTWyHHXcRepe1 EP7Pi9dy5mw0V2ZUYQy0v6tq/zB6qBeN/duRy/PwBcRzd9wk/tdZXOkEW+0yKnlt Lqi3qoS9IlDQqNBy1JaUSX+uIjfCbJTX6YEqkno6buOZ6dpRBtBcptSRcqrR7JWa ALuwiNA5lGSLRCcVQXamBqINwgXBF75U5mECqQNvV9iTM1zcd2w0vsfJe4JveWj+ +AlcMt62v9R7Plb9E2hLAn1wv56PU7CsyPj3hVh/yQ6kTv63xWFYWK0Qnp9S6Bt9 uDdMlfob/qmxwQXR1XkyC2D5YyJ3GLwA4HX0GvPHxFGSktcAFnF13eVF0LMCMPE8 H+ieHBlopPasKbKGA4UWvTDmzEItXeUv+KDqUB/LYFGcvXS0FFivE2AMBbdWnpsI 5P1+5S49MYUzDtmoEAvbMLfhdIp7CcF9EXaBRXl+To3AF6DMwrt9lBAKHVbW17l1 9n1Ej/TKHkfsGypFkms+cjAmkDtAFE28X2IfFGJw4Jle0bvjUJv544INf1tZQHYV KOXWTixPjfZuMty1pbziBBFrCRq6NScaf1MTdx96L1epF8tjgjmbXBuClJVAcvxn HAtwADuBxhdHeZziIS9pJJERVzMGr3MiZX+pag3f90y4aewIBkk= =kYFg -----END PGP SIGNATURE----- --=-=-=--