David Feuer

Results 993 comments of David Feuer

@meooow25 You had suggested ```haskell dfs_preOrder :: Graph -> [Vertex] -> [Vertex] dfs_preOrder g vs0 = run (bounds g) $ go vs0 (pure []) where go :: [Vertex] -> SetM...

You've basically faked up the internal machinery of lazy `ST` there. The real one is splattered with `NOINLINE`s to avoid certain safety issues and is not likely to be faster,...

`restrictKeys` exists because it can be particularly efficient.

I don't feel strongly about it. I guess it adds symmetry, balancing `filter`.

`filterWithKeyA` would be a good one, yeah. Maybe some more `mergeA` machinery too.

@meooow25 , I started rambling about this in comments on your PR. Feel very welcome to think about it.

We can certainly improve the *space* requirement for the result to $O(2^n)$, though I don't yet know whether or we can do so without making the time blow up. In...

Continuing to think out loud: imagine we build all the singletons first, then the 2-sets, then the 3-sets, etc. When we're working on the $k$-sets, we can hold on to...

For the next ... while ... I will assume that we're taking the power set of `[1..n]`. That can be generalized by tracking the position (in the original set) of...

@ekmett Do you have any ideas, either in the direction I'm pointing or another one?