Advertisement
Guest User

Untitled

a guest
Dec 11th, 2018
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
F# 0.43 KB | None | 0 0
  1.     let rec dfs toIn toOut toCheckEntry acc start gr =
  2.         let newDfs = dfs toIn toOut toCheckEntry
  3.         let innerDfs newAcc v w =
  4.             if toCheckEntry start v w newAcc
  5.             then newDfs newAcc v gr
  6.             else newAcc
  7.         let pastInAcc = toIn start acc
  8.         let pastChildrenAcc = Map.fold innerDfs pastInAcc <| getAdjList start gr
  9.         let pastOutAcc = toOut start pastChildrenAcc
  10.         pastOutAcc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement