-
Notifications
You must be signed in to change notification settings - Fork 9
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
seq-map on vector that returns a vector? #10
Comments
Philippe Vaucher <[email protected]> writes:
Hello,
Hi Phillipe,
For example, the following surprised me:
``` emacs
(-map '1+ [1 2 3 4]) ;; => '(2 3 4 5)
```
That seems to be -map for dash.el, but indeed seq.el behaves the same
way here.
I agree that it can be surprising.
|
I see that you reply by email and thus miss the edits I did (I edited it to be Anyway, what about the questions? Is it because of implementation issues or is it because it's desired? Shouldn't theoretically all methods return the same type as passed? |
Philippe Vaucher <[email protected]> writes:
I see that you reply by email and thus miss the edits I did (I edited
it to be `seq-map`).
Ah, ok :)
Anyway, what about the questions? Is it because of implementation
issues or is it because it's desired? Shouldn't theoretically all
methods return the same type as passed?
When implementing seq-map, I didn't mind returning a list from another
seq type, as the implementation as much easier that way.
I do understand that it can be surprising though, so I would agree to
change that behavior.
|
Okay, continuing in #11 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
Why do some function respect the sequence type and some other convert to list?
Is it because of implementation issues or is it because it's desired? Wouldn't eventually all methods return the same type?
For example, the following surprised me:
Having to
(apply '#vector ...)
all the time annoys me 😆The text was updated successfully, but these errors were encountered: