Share your repls and programming experiences

← Back to all posts
Accept any Sequence of String as a parameter
s3cur3 (0)

I wanted a function to be able to accept a container (really a Sequence) of any type, as long as its values are of the right type. For instance, I want it to be able to take a Set<String>, an Array<String>, or a Whatever<String>... I don't care what the container type is.

This demonstrates two ways to accomplish that.

Comments
hotnewtop
RohilPatel (1534)

Have you made any apps? I'm working on making one and I'm kind of looking for UI ideas