Silver array methods chaining

The following code works perfectly in Swift:

let sum = [1, 2, 3, 4, 5]
    .filter({$0 > 3})
    .reduce(0) { $0 + $1 }

println("the sum is \(sum)")

but Silver give errors:

error E44: No member "reduce " on type "System.Collections.Generic.IEnumerable<Int32>!"
error E114: Method has no result

As far as filter implementation uses IEnumerable.Where (because I need explicitly import System.Linq), reduce should use Aggregate

This is something we need to look at, yes. We purposely changed filter() to return a sequence, rather than an array — for performance and flexibility reasons. Burt that of course means you cannot directly call standard Array methods on its result, because it’s not an array. We should probably look at exposing some/all of the standard Swift array/collection methods on sequences, as well.

Thanx for bringing this up!

Thanks, logged as bugs://72141

That said, doesn’t look like we have reduce() implemented to start with, not even on Array. On the list though.

bugs://72141 got closed with status fixed.

Was there a change in .filter() that prompted the fix message, or was this just cleanup?
This is a duplicate of Swift Array.filter() returning Iterable<> that can't be assigned to array

This was just bugdb cleanup, as the .filter method was added ages ago, and i noticed the issue was still open.