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