I may be missing something, but what about using the TypeTrees module to obtain the typenames, and then using methodswith() to establish whether each type has the methods start, next and stop? It would be a bit slow, of course, but if you dig around in the source code of methodswith you could probably find some quicker way of specifically testing types for individual methods.
On Sunday, October 25, 2015 at 10:11:27 PM UTC+1, Mauro wrote: > > > An iterable type is obtained by defining start, next and end methods for > > such a type. > > Is there a way to obtain the list of all functions that work on iterable > > types? > > No, that is not possible at the moment. Interfaces/traits are implicit > in Julia (for now) and it is not (easily) possible to make dispatch work > on them. See: > https://github.com/JuliaLang/julia/issues/6975 > https://github.com/mauro3/Traits.jl > > > I can see that there are some functions listed under the Iteration > section > > but it does not seem to be the full story. > > For example mapreduce works on iterable types (nice) but it seems that > the > > length function is not defined on iterables. Why is it so? > > Iterables can be of infinite length. For an infinite one a `length` > function would just hang. Thus it is probably not a good idea. >
