Commit 9066a0bf authored by Alexandre Delanoë's avatar Alexandre Delanoë

[FIX] perf issue with List related with #218 (thx @np)

parent b22297b8
......@@ -2,8 +2,10 @@ module Gargantext.Utils.List where
import Data.Ord (class Ord, comparing)
import Data.List as List
import Data.Array as Array
import Gargantext.Prelude
-- same as
sortWith :: forall a b. Ord b => (a -> b) -> List.List a -> List.List a
sortWith f = List.sortBy (comparing f)
sortWith f l = Array.toUnfoldable $ Array.sortBy (comparing f) $ Array.fromFoldable l
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment