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

Generic Map? #11

Open
Gavinok opened this issue Jul 14, 2022 · 1 comment
Open

Generic Map? #11

Gavinok opened this issue Jul 14, 2022 · 1 comment

Comments

@Gavinok
Copy link

Gavinok commented Jul 14, 2022

Thoughts on adding a generic map similar to map from clojure? I've seen some call it fmap (the haskell naming) and figure it would be a pretty easy addition.

usage

(fmap #'1+ '(1 2 3 4))
@eigenhombre
Copy link
Owner

@Gavinok Thanks for the thoughts. Interesting idea. For lists, of course, there is already mapcat, but Clojure's map accepts multiple collection types. It also yields a lazy sequence as output, which I'm explicitly avoiding for now. I will have to think about whether a generic implementation makes sense here. Going to leave this issue open in case anyone else wants to weigh in.

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