This is the documentation: http://docs.julialang.org/en/latest/stdlib/base/#iteration
You may also want to contribute to: https://github.com/JuliaLang/Iterators.jl -viral On Sunday, July 27, 2014 5:43:39 PM UTC+5:30, Ben Ward wrote: > > Hi, > > I've been writing a type for recursive tree structures, and several types > that traverse that tree in various manners like breadth first or depth > first. They have their own methods for getting the current tree node, > moving to the next node, whether an end has been reached and so on. The > contain fields for the nodes several steps ahead, those past etc. I > wondered if I might make it so as these types might easier be used in loops > by giving them the iterator protocol methods? I've not seen how to define > custom operators, is it as simple as defining start next and done? How is > the current value gotten? I guess its returned by next(). > > Thanks, > Ben. >
