You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Most other nubbing functions are as lazy as possible, but sortNub takes O(n log n) time to produce the first element when it can be done in O(n). I'd expect there to be a version that's lazier.
lazySortNub xs = [x | x : _ <- group (sort xs)]
The text was updated successfully, but these errors were encountered:
Most other nubbing functions are as lazy as possible, but
sortNub
takesO(n log n)
time to produce the first element when it can be done inO(n)
. I'd expect there to be a version that's lazier.The text was updated successfully, but these errors were encountered: