Repository navigation
Clean list API - #7290
Clean list API#7290
Conversation
There was a problem hiding this comment.
⚠️ Performance Alert ⚠️
Possible performance regression was detected for benchmark 'Syntax Benchmarks'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.05.
| Benchmark suite | Current: c20e7b1 | Previous: e1b7fb7 | Ratio |
|---|---|---|---|
Parse RedBlackTree.res - time/run |
1.34950402 ms |
1.2123143266666667 ms |
1.11 |
Parse Napkinscript.res - time/run |
42.166715106666665 ms |
39.28006235333333 ms |
1.07 |
Parse HeroGraphic.res - time/run |
5.705078513333333 ms |
5.13472718 ms |
1.11 |
This comment was automatically generated by workflow using github-action-benchmark.
057bdb8 to
3be7cfe
Compare
| } | ||
|
|
||
| let toShuffled = xs => { | ||
| let shuffle = xs => { |
There was a problem hiding this comment.
Not sure about this one.
On the one hand, it may be confusing that in the Array module shuffle mutates whereas in the List module it does not. On the other hand, we know that list is immutable...
There was a problem hiding this comment.
yeah I'm a bit torn on this one too.
There was a problem hiding this comment.
Hmm... I guess either is fine with me. Any preference from your side @zth?
There was a problem hiding this comment.
my personal preference would be to use shuffle given list is immutable and the signature is clear, but up to you guys!
7e3e112 to
e85f510
Compare
f89dec9 to
4d092f0
Compare
c20e7b1 to
ac8dd9e
Compare
|
@cknitt rebased! |
|
Great, thanks! However, could you put the re-adding of |
e4fefe8 to
0971bc6
Compare
|
@cknitt done |
|
@tsnobip Completion tests are failing again now |
* remove List.t<'a> from Core and use list<'a> instead * rename `toShuffled` to `shuffle` and deprecate it * deprecate List.*Assoc functions towards the use of Map * update changelog * fix typo in fromInitializer docstring * fix typo in docstring * fix completion tests Signed-off-by: Pedro Castro <aspeddro@gmail.com>
List.ttoShuffledtoshuffleand deprecate itList.*AssocfunctionsI think this solves most issues raised in rescript-lang/rescript-core/issues/192.
I have no good idea for
List.concatManyso I just kept it.I'd rather keep
List.hasandList.lengthas it is today and maybe we could addArray.hasfor consistency.