update subvec-slices, add dfs-backward
refactor dfs-forward/backward into single dfs fn
update dfs fns to also return triples
add accumulate-var-triples