unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: <tomas@tuxteam.de>
To: guile-devel@gnu.org
Subject: Re: srfi-1 take and drop seriously broken
Date: Sat, 19 Nov 2016 22:52:12 +0100	[thread overview]
Message-ID: <20161119215211.GA15707@tuxteam.de> (raw)
In-Reply-To: <87vavjqici.fsf@gnu.org>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sat, Nov 19, 2016 at 10:18:21PM +0100, Jan Nieuwenhuizen wrote:
> Jan Synáček writes:
> 
> > scheme@(guile-user)> ,use (srfi srfi-1)
> > scheme@(guile-user)> (take (list 1 2 3) 4)
> > ERROR: In procedure list-head:
> > ERROR: In procedure list-head: Wrong type argument in position 1
> > (expecting pair): ()
> 
> That's expected.
> 
> > scheme@(guile-user) [1]> (drop (list 1 2 3) 4)
> > ERROR: In procedure list-tail:
> > ERROR: In procedure list-tail: Wrong type argument in position 1
> > (expecting pair): ()
> 
> That too.
> 
> > Please, tell me that this is just a mistake...
> 
> It's just a mistake!
> 
> > This can't be true. I still can't believe it. This is from
> > 2.0.11. Please, tell me that the implementation is fixed in 2.2.
> 
> You'd have to give me more clues about what it is that puzzles you
> and why.
> 
> > Yours truly puzzled,
> 
> Do you possibbly mean something like
> 
> --8<---------------cut here---------------start------------->8---
> scheme@(guile-user)> (use-modules (srfi srfi-1))
> scheme@(guile-user)> (take '(list 1 2 3) 4)
> $1 = (list 1 2 3)
> scheme@(guile-user)> (drop '(list 1 2 3) 4)
> $2 = ()
> --8<---------------cut here---------------end--------------->8---

Hm. Jan's example should work, nevertheless. And it does work for me:

  tomas@rasputin:~$ guile
  GNU Guile 2.0.11.133-d680
  Copyright (C) 1995-2014 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)> (use-modules (srfi srfi-1))
  scheme@(guile-user)> (take (list 1 2 3 4) 4)
  $1 = (1 2 3 4)
  
Hmmm.

(note my Guile version, which is a tad beyond "plain" 2.0.11;
but FWIW it works for me in Guile 1.8 too)

regards
- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlgwyYsACgkQBcgs9XrR2kZKGwCfdjI4+zOQFWgaM+WMZb95v22x
gi8An10EyxTJ+NAgO/FWqwjcQ3CiuMWC
=EXVs
-----END PGP SIGNATURE-----



  reply	other threads:[~2016-11-19 21:52 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-19 18:34 srfi-1 take and drop seriously broken Jan Synáček
2016-11-19 21:18 ` Jan Nieuwenhuizen
2016-11-19 21:52   ` tomas [this message]
2016-11-20  3:32     ` Eli Zaretskii
2016-11-20 10:18       ` tomas
2016-11-20 10:39   ` Jan Synáček
2016-11-19 22:55 ` Panicz Maciej Godek
2016-11-20 10:42   ` Jan Synáček
2016-11-20 11:23     ` Panicz Maciej Godek
2016-11-20 18:31       ` dsmich
2016-11-21  7:34         ` Jan Synáček
2016-11-21 10:21           ` Panicz Maciej Godek

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

  List information: https://www.gnu.org/software/guile/

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

  git send-email \
    --in-reply-to=20161119215211.GA15707@tuxteam.de \
    --to=tomas@tuxteam.de \
    --cc=guile-devel@gnu.org \
    /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).