Open
Description
sort $ range 1 1000000
/home/miles/projects/purescript/lists/output/Data.List/index.js:287
return as(new Data_List_Types.Cons(a, ys));
^
RangeError: Maximum call stack size exceeded
at $tco_var_as (/home/miles/projects/purescript/lists/output/Data.List/index.js:287:39)
Should we swap out this current version (which I assume depends on Haskell's laziness) for something that just reuses Array's sortBy
? I think that might end up being faster even in situations where we're not having stack issues.
purescript-lists/src/Data/List.purs
Lines 447 to 482 in 6d8e30e