-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid O(n^2) time broadcast' by replacing Writer
With the strict state monad we can prepend the items to a list and then reverse the list afterwards. This brings the time complexity down from `O(n^2)` (because of the mappend/list concatenation used by Writer) to `O(n)`. Resolves #102.
- Loading branch information
1 parent
9d443e1
commit bd83c69
Showing
1 changed file
with
10 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters