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

19
LINES

< > BotCompany Repo | #1017883 // map_pcall_notNull

JavaX fragment (include)

static L map_pcall_notNull(Iterable l, O f) {
  ret map_pcall_notNull(f, l);
}

static L map_pcall_notNull(O f, Iterable l) {
  new L x;
  for unnull (O o : l) pcall { addIfNotNull(x, callF(f, o)); }
  ret x;
}

static <A, B> L<B> map_pcall_notNull(IF1<A, B> f, Iterable<A> l) {
  new L x;
  for unnull (O o : l) pcall { addIfNotNull(x, callF(f, o)); }
  ret x;
}

static <A, B> L<B> map_pcall_notNull(Iterable<A> l, IF1<A, B> f) {
  ret map_pcall_notNull(f, l);
}

Author comment

Began life as a copy of #1010000

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1017883
Snippet name: map_pcall_notNull
Eternal ID of this version: #1017883/4
Text MD5: 3eb1a546d748b25933c57c83f58edae2
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-11-02 14:28:56
Source code size: 482 bytes / 19 lines
Pitched / IR pitched: No / No
Views / Downloads: 348 / 404
Version history: 3 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)