public inbox for kawa@sourceware.org
 help / color / mirror / Atom feed
From: Arvydas Silanskas <nma.arvydas.silanskas@gmail.com>
To: Philippe de Rochambeau <phiroc@free.fr>
Cc: kawa mailing list <kawa@sourceware.org>
Subject: Re: values
Date: Sun, 26 Sep 2021 15:33:09 +0300	[thread overview]
Message-ID: <CAPh7weA1eio1b9dvK_Gagitxv6_Zdqzx2jV8Ud6Z7a-ZEGmXNQ@mail.gmail.com> (raw)
In-Reply-To: <9C7CF706-65C5-40E5-8949-EB836F398DDD@free.fr>

Hi

generally you would use constructs like define-values or let-values to
declare multiple variables which will be bound to the received multiple
values. There is also a more primitive call-with-values construct for
piping those values as arguments to some procedure. To get a list, you
could use `(call-with-values (lambda () (values 1 3)) list)`.

Arvydas

2021-09-26, sk, 14:57 Philippe de Rochambeau via Kawa <kawa@sourceware.org>
rašė:

> Hello,
> how do you retrieve the first item returned by the values procedure?
> I’ve tried (first (values 1 3)), but to no avail, because values doesn’t
> return a list.
> Many thanks.
> Philippe

  reply	other threads:[~2021-09-26 12:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-26 11:56 values Philippe de Rochambeau
2021-09-26 12:33 ` Arvydas Silanskas [this message]
2021-09-26 13:25   ` values Philippe de Rochambeau
2021-09-26 13:37     ` values Philippe de Rochambeau
2021-09-26 16:19       ` values Philippe de Rochambeau

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

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

  git send-email \
    --in-reply-to=CAPh7weA1eio1b9dvK_Gagitxv6_Zdqzx2jV8Ud6Z7a-ZEGmXNQ@mail.gmail.com \
    --to=nma.arvydas.silanskas@gmail.com \
    --cc=kawa@sourceware.org \
    --cc=phiroc@free.fr \
    /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).