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

11
LINES

< > BotCompany Repo | #4001799 // wUmrLVWz

User-supplied dialog

static <A> L<A> takeUntil(Iterable<A> l, bool includeLast, IF1<A, Bool> pred) {
  new L<A> out;
  fOr (A a : l)
    if (pred.get(a)) {
      if (includeLast)
        out.add(a);
      ret out;
    } else
      out.add(a);
  ret out;
}

Author comment

1

download  show line numbers   

Travelled to 1 computer(s): mqqgnosmbjvj

No comments. add comment

-
Snippet ID: #4001799
Snippet name: wUmrLVWz
Eternal ID of this version: #4001799/1
Text MD5: 9c6e4b1151c033f743d5d3cd5eaeab92
Author: wumrlvwz
Category: 1
Type: User-supplied dialog
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2026-03-13 20:18:15
Source code size: 246 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 27 / 10
Referenced in: