func (g *mutableUndirected) Edges(f EdgeStep) {
	g.mu.RLock()
	defer g.mu.RUnlock()
	visited := set.New(set.NonThreadSafe)
	for source, adjacent := range g.list {
		for target := range adjacent {
			e := NewEdge(source, target)
			if !visited.Has(NewEdge(target, source)) {
				visited.Add(e)
				if f(e) {
					return
				}
			}
		}
	}
}
Traverses the set of edges in the graph, passing each edge to the
provided closure.
package al
import (
	. "github.com/sdboyer/gogl"
	"gopkg.in/fatih/set.v0"
)
type mutableUndirected struct {
	al_basic_mut
}
func (g *mutableUndirected) DegreeOf(vertex Vertex) (degree int, exists bool) {
	g.mu.RLock()
	defer g.mu.RUnlock()
	if exists = g.hasVertex(vertex); exists {
		degree = len(g.list[vertex])
	}
	return
}