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

11
LINES

< > BotCompany Repo | #1029574 // dm_isFirstSiblingModule - uses some arbitrary sorting (currently by module ID)

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

Transpiled version (3050L) is out of date.

sbool dm_isFirstSiblingModule_debug;

sbool dm_isFirstSiblingModule(O mod) {
  S libID = dm_moduleLibID(mod);
  if (libID == null) false;
  LS siblings = dm_modulesWithLibID(libID);
  if (dm_isFirstSiblingModule_debug)
    printVars(+libID, +siblings);
  if (empty(siblings)) true; // no idea why this happens sometimes
  ret eq(dm_moduleID(mod), lowestByAlphaNum(siblings));
}

Author comment

Began life as a copy of #1027529

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1029574
Snippet name: dm_isFirstSiblingModule - uses some arbitrary sorting (currently by module ID)
Eternal ID of this version: #1029574/5
Text MD5: c71135aa4c9fd463e7082677db6677db
Author: stefan
Category: javax / stefan's os
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-06-09 06:40:53
Source code size: 387 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 235 / 341
Version history: 4 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1029575 - dm_assertFirstSibling - fails if we are not the first sibling for this module lib ID