Libraryless. Click here for Pure Java version (20640L/125K).
svoid test_UniquifyUsingHasher() { UniquifyUsingHasher<S, Int> u = new(s -> l(s)); int n = 1000, maxL = 10; LS l = repF(n, -> randomOverAlphabet("ab", random(maxL))); print(takeFirst(10, l)); LS expected = uniquify(l); LS actual = u.addAll(l)!; print(n + " => " + l(expected)); assertListsEqual(expected, actual); }
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, ekrmjmnbrukm, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1034800 |
Snippet name: | test_UniquifyUsingHasher |
Eternal ID of this version: | #1034800/4 |
Text MD5: | 2ae7957707579549ab7f389637e0b74d |
Transpilation MD5: | 8ba60c6ad3f285947a8ba46215f2d578 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-03-10 19:24:34 |
Source code size: | 340 bytes / 10 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 139 / 205 |
Version history: | 3 change(s) |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |