Wolox / ReactiveArray

An array class implemented in Swift that can be observed using ReactiveCocoa's Signals
MIT License
53 stars 12 forks source link

Add a convenience initializer that takes a variadic list of elements #11

Open Adlai-Holler opened 9 years ago

Adlai-Holler commented 9 years ago

Resolves #8 . Unfortunately the compiler can't infer the element type in this case so you have to do ReactiveArray<Int>(1, 2, 3, 4). I'd actually say not to merge this, since manually specifying the type is dumb, but I felt like getting my feet wet with those awesome-looking project!

guidomb commented 9 years ago

Sorry for the delayed response last week has been crazy for me.

I agree that having to specify the type when using the convenience initializer is dumb but it might be fixed in future versions of the compiler.

Could you add a test case for this initializer?

Thanks for contribution!