Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #14: better implementation of tail for DList
PR #5 offered a workaround for the regression in `dlist-1.0` which changed the type of the `tail` function for difference lists (so it does not have the type `DList a -> DList a` of a tail function anymore). The problem with #5 is that it collapses the difference list to compute its tail. Here, we offer a solution that does not collapse the difference list, by precomposing the `Data.List.tail` with the underlying function `[a] -> [a]` of a difference list. Data.List.Unsafe gives us access to this function. This problem would better be fixed upstream, see spl/dlist#98
- Loading branch information