This repository was archived by the owner on Oct 4, 2020. It is now read-only.
Commit ba06add
committed
More efficient
Keep a List of Maps as the unfold state, instead of a single Map.
Unioning Maps was linear time (making the entire function quadratic?).
Prepending to a List is constant time and doesn't require an `Ord k` instance.toUnfoldable without the Ord constraint1 parent 079c2fb commit ba06add
1 file changed
Lines changed: 9 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
372 | 372 | | |
373 | 373 | | |
374 | 374 | | |
375 | | - | |
376 | | - | |
377 | | - | |
378 | | - | |
379 | | - | |
380 | | - | |
381 | | - | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
382 | 384 | | |
383 | 385 | | |
384 | 386 | | |
| |||
0 commit comments