Skip to content

Instantly share code, notes, and snippets.

@lkuper
Created January 22, 2014 04:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lkuper/8553488 to your computer and use it in GitHub Desktop.
Save lkuper/8553488 to your computer and use it in GitHub Desktop.
nbrs :: G.Graph -> G.Vertex -> [G.Vertex]
nbrs g v =
map snd edgesFromNode where
edgesFromNode = filter (\(v1, _) -> v1 == v) (G.edges g)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment