On Thursday, September 22, 2016 at 6:10:29 PM UTC-4, Tsur Herman wrote: > > The real problem is that eltype(t^2 for t in rand(10)) returns Any. > > > that is not a problem (t^2 for t in rand(10)) is a generator its element > type is Any which means a pointer to something complex. > >> It is a problem, because it means that the result type of sum cannot be inferred.
We could use type inference on the function t -> t^2 (which is buried in the generator) to determine a more specific eltype.
