
22 Mar
2010
22 Mar
'10
10:46 a.m.
Bertram Felgenhauer wrote:
or bfs next start = lefts . takeWhile (not . null)
I copied the wrong version. This should be bfs next start = rights . concat . takeWhile (not . null) -- rest unchanged . unfoldr (Just . span (either (const False) (const True)) . tail) $ fix (nub . (Left 0 :) . (Right start :) . (>>= either ((:[]) . Left . succ) (map Right . next))) Bertram