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

10
LINES

< > BotCompany Repo | #1030192 - allElementsEqual

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (2528L/16K).

static <A> bool allElementsEqual(Iterable<A> l) {
  if (l == null) true;
  Iterator<A> it = iterator(l);
  if (!it.hasNext()) true;
  A a = it.next();
  while ping (it.hasNext()) {
    if (!eq(a, it.next())) false;
  }
  true;
}

Author comment

Began life as a copy of #1008440

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx

No comments. add comment

Snippet ID: #1030192
Snippet name: allElementsEqual
Eternal ID of this version: #1030192/1
Text MD5: 8d4e5519b8723c0684e755e73ee8133b
Transpilation MD5: d00417792ab37cf235f85d9ad56c2c86
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-11-14 12:01:29
Source code size: 237 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 35 / 50
Referenced in: [show references]

Formerly at http://tinybrain.de/1030192 & http://1030192.tinybrain.de