Relative Content

Tag Archive for collections

What Scala type to use for a list of meeting participants

I want to store a number of participants for a meeting. The order of them is not important. The only thing I want to make sure is, that I will be able to add and remove participants, use filter functions (and alike) and get their number. Also duplicates are not allowed.
I started using List for the method signature, but now I wonder if I should accept a more abstract type. I saw types like Traversable, TraversableLike, Iterable and IterableLike.

What Scala type to use for a list of meeting participants

I want to store a number of participants for a meeting. The order of them is not important. The only thing I want to make sure is, that I will be able to add and remove participants, use filter functions (and alike) and get their number. Also duplicates are not allowed.
I started using List for the method signature, but now I wonder if I should accept a more abstract type. I saw types like Traversable, TraversableLike, Iterable and IterableLike.

What Scala type to use for a list of meeting participants

I want to store a number of participants for a meeting. The order of them is not important. The only thing I want to make sure is, that I will be able to add and remove participants, use filter functions (and alike) and get their number. Also duplicates are not allowed.
I started using List for the method signature, but now I wonder if I should accept a more abstract type. I saw types like Traversable, TraversableLike, Iterable and IterableLike.

Why python function programming functions are not collection methods? [duplicate]

This question already has answers here: Are there any actual drawbacks to self-referential method chaining? (4 answers) Closed 9 years ago. In other words, is there a Python design related reason for it to be so? Functions like map, filter, reduce etc. are just plain functions. Is it just a poor design choice (if it […]

Why python function programming functions are not collection methods? [duplicate]

This question already has answers here: Are there any actual drawbacks to self-referential method chaining? (4 answers) Closed 9 years ago. In other words, is there a Python design related reason for it to be so? Functions like map, filter, reduce etc. are just plain functions. Is it just a poor design choice (if it […]

Injecting collections as constructor dependencies

We are using constructor dependency injection in our application. Following that approach we inject everything using an injection container so we are able to replace any dependency with a Mock.