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


< > BotCompany Repo | #1008655 // getFirstPercent - get a percentage of list (from beginning)

JavaX fragment (include)

static <A> L<A> getFirstPercent(L<A> l, double percent) {
  ret takeFirst(iround(percent/100*l(l)), l);

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1008655
Snippet name: getFirstPercent - get a percentage of list (from beginning)
Eternal ID of this version: #1008655/2
Text MD5: dd5e0a69315f801e79e9f87d100a8443
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-05-27 01:08:53
Source code size: 107 bytes / 3 lines
Pitched / IR pitched: No / No
Views / Downloads: 435 / 477
Version history: 1 change(s)
Referenced in: [show references]