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

More generic concatenate? #4

Closed
simendsjo opened this issue Mar 26, 2024 · 3 comments · Fixed by #5
Closed

More generic concatenate? #4

simendsjo opened this issue Mar 26, 2024 · 3 comments · Fixed by #5

Comments

@simendsjo
Copy link

t:concatenate is bound to using lists as input, which doesn't make sense when all inputs are vectors and the reducer is t:vector. Should t:concatenate look at input to determine if t:list-reduce or t:vector-reduce should be used? Or hardcode knowledge of t:vector as reducer to convert input to a vector if needed?

I just copy/pasted t:concatenate to a version using t:vector-reduce and use that, but it's a bit dirty.

@fosskers fosskers linked a pull request Mar 26, 2024 that will close this issue
@fosskers
Copy link
Owner

fosskers commented Mar 26, 2024

Check out the first-pass of the PR I just pushed. I still need to add a proper Condition for when the input isn't a list/vector/string, as well as some unit tests.

@fosskers
Copy link
Owner

fosskers commented Apr 8, 2024

Hi there, any thoughts?

@simendsjo
Copy link
Author

Hi there, any thoughts?

I have an alternative which works for all types of sources without hardcoding them: #8 (comment)

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

Successfully merging a pull request may close this issue.

2 participants