Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the List argument for the SUBLIST function seems absurd #1017

Closed
JeanBaptistePelliccia opened this issue Sep 3, 2021 · 1 comment
Closed

Comments

@JeanBaptistePelliccia
Copy link

the List argument for the SUBLIST function, do différent things depending on the number of element in the list. This argument seems to act like the arguments start end for the same fonction when the list is of size 2 and when the size is different of 2 it seems to act like the fonction GET with the elements of the list on the top of the stack as index .

Example :

`
[ 0 1 2 3 4 ] [ 1 3 ] SUBLIST

[ 0 1 2 3 4 ] [ 1 ] SUBLIST

[ 0 1 2 3 4 ] [ 1 3 4 ] SUBLIST

`

@ftence
Copy link
Contributor

ftence commented Sep 10, 2021

This is the expected behavior according to the documentation. I do agree that this is strange but we cannot change that as some production code may depend on that behavior.

Maybe we could change that in the next major release, this is open to discussion.

@ftence ftence closed this as completed Sep 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants