Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

7
LINES

< > BotCompany Repo | #1030527 // test_lastIndexOfRangePredicate_IIntIntPred (OK)

JavaX fragment (include)

svoid test_lastIndexOfRangePredicate_IIntIntPred(int maxLength default 8) {
  for (S word : allWordsOfAlphabet_maxLength(maxLength, "ft")) {
    L<Bool> l = map(characters(word), c -> c == 't');
    assertEqualsVerbose(word, lastIndexOf(l, true),
      lastIndexOfRangePredicate_IIntIntPred(l(l), (i, j) -> any(subList(l, i, j))));
  }
}

Author comment

Began life as a copy of #1030508

download  show line numbers  debug dex  old transpilations   

Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt

No comments. add comment

Snippet ID: #1030527
Snippet name: test_lastIndexOfRangePredicate_IIntIntPred (OK)
Eternal ID of this version: #1030527/1
Text MD5: 953f34675e43baf55c9862f19f1bd578
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-01-05 22:21:58
Source code size: 343 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 161 / 198
Referenced in: [show references]