Libraryless. Click here for Pure Java version (9550L/54K).
static <A, B> L<B> lambdaMapLike lazilyMap(IF1<A, B> f, L<A> l) { ret lazyMap((O) f, l); } static L lazilyMap(fO f, fL l) { ret new RandomAccessAbstractList { final int size = l(l); new HashMap<Int, O> data; public int size() { ret size; } public O get(int i) { if (data.containsKey(i)) ret data.get(i); O o = callF(f, l.get(i)); data.put(i, o); ret o; } }; } static <A, B> L<B> lazilyMap(L<A> l, IF1<A, B> f) { ret lazilyMap(f, l); }
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