[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: srfi-1 take and drop seriously broken
From: |
Eli Zaretskii |
Subject: |
Re: srfi-1 take and drop seriously broken |
Date: |
Sun, 20 Nov 2016 05:32:25 +0200 |
> Date: Sat, 19 Nov 2016 22:52:12 +0100
> From: <address@hidden>
>
> 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.
> >
>
> Hm. Jan's example should work, nevertheless. And it does work for me:
>
> address@hidden:~$ 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)
Your example has 4 members in the list, while the original one had
only 3.