cactoos icon indicating copy to clipboard operation
cactoos copied to clipboard

Joined(Iterable<? extends T> items, T item)

Open yegor256 opened this issue 3 years ago • 7 comments

How about we introduce a new ctor Joined(Iterable<? extends T> items, T item), which will add the item to the end of the list. Currently, the existing ctor Joined(T item, Iterable<? extends T> items) prepends the list with a new item. I didn't manage to find how to append it.

yegor256 avatar Jun 22 '21 10:06 yegor256

@yegor256 to append it you can use something like: new Joined(items, new IterableOf(item)) but I agree we can indeed add a constructor for this use case. I would generify it by proposing we introduce Joined(Iterable<? extends T> items, T... appended)

victornoel avatar Jun 22 '21 11:06 victornoel

@0crat in

victornoel avatar Jun 22 '21 11:06 victornoel

@0crat in

victornoel avatar Jul 24 '21 14:07 victornoel

@0crat in

victornoel avatar Sep 05 '21 09:09 victornoel

I can pick this one up. Seems like a good first contribution. Do you all have contributor guidelines anywhere? Looks like there's a qulice profile that will run a code style check.

william746a avatar Dec 16 '23 01:12 william746a

@william7b7d yep, you can make a PR and we will review it. qulice will be executed automatically. If you have doubts about what needs to be done, don't hesitate to ask here first!

victornoel avatar Dec 16 '23 15:12 victornoel

Okay got a PR together. Let me know if I missed anything.

https://github.com/yegor256/cactoos/pull/1705

william746a avatar Dec 17 '23 02:12 william746a