Current implementation of closure uses Prelude's nub function for removing duplicates. This function is O(n^2), yet it can be improved using nub for ordered lists which is O(n).
This, however, will restrict the type of states to ordered types. Should we use the more efficient version of nub?
Current implementation of
closureuses Prelude'snubfunction for removing duplicates. This function is O(n^2), yet it can be improved usingnubfor ordered lists which is O(n).This, however, will restrict the type of states to ordered types. Should we use the more efficient version of
nub?