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

seq-map on vector that returns a vector? #10

Closed
Silex opened this issue Apr 27, 2020 · 4 comments
Closed

seq-map on vector that returns a vector? #10

Silex opened this issue Apr 27, 2020 · 4 comments

Comments

@Silex
Copy link

Silex commented Apr 27, 2020

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:

(seq-map '1+ [1 2 3 4]) ;; => '(2 3 4 5)

Having to (apply '#vector ...) all the time annoys me 😆

@NicolasPetton
Copy link
Owner

NicolasPetton commented Apr 27, 2020 via email

@Silex
Copy link
Author

Silex commented Apr 28, 2020

I see that you reply by email and thus miss the edits I did (I edited it to be seq-map).

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?

@NicolasPetton
Copy link
Owner

NicolasPetton commented Apr 28, 2020 via email

@Silex
Copy link
Author

Silex commented Apr 28, 2020

Okay, continuing in #11

@Silex Silex closed this as completed Apr 28, 2020
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