unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* Error on returning a pair
@ 2020-05-08 12:31 reetindersidhu
  2020-05-08 14:23 ` Stefan Israelsson Tampe
  0 siblings, 1 reply; 2+ messages in thread
From: reetindersidhu @ 2020-05-08 12:31 UTC (permalink / raw)
  To: Guile User Mailing List

Hi

Getting a guile error for

  (lambda (x) (x . x))

but not for

  (lambda (x) (x x))

This may be a dumb question, but why is this?

Same behavior in versions 2.2.6 and 3.0.2.

Regards
Reetinder Sidhu



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Error on returning a pair
  2020-05-08 12:31 Error on returning a pair reetindersidhu
@ 2020-05-08 14:23 ` Stefan Israelsson Tampe
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Israelsson Tampe @ 2020-05-08 14:23 UTC (permalink / raw)
  To: reetindersidhu; +Cc: Guile User Mailing List

(x . x) is not creating a pair, use (cons x x) or `(,x . ,x)

On Fri, May 8, 2020 at 4:16 PM reetindersidhu <reetindersidhu@pes.edu>
wrote:

> Hi
>
> Getting a guile error for
>
>   (lambda (x) (x . x))
>
> but not for
>
>   (lambda (x) (x x))
>
> This may be a dumb question, but why is this?
>
> Same behavior in versions 2.2.6 and 3.0.2.
>
> Regards
> Reetinder Sidhu
>
>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-05-08 14:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-08 12:31 Error on returning a pair reetindersidhu
2020-05-08 14:23 ` Stefan Israelsson Tampe

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).