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

15
LINES

< > BotCompany Repo | #1002635 // rep - synonym of repeat

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

Libraryless. Click here for Pure Java version (63L/1K).

static String rep(int n, char c) {
  ret repeat(c, n);
}

static String rep(char c, int n) {
  ret repeat(c, n);
}

static <A> L<A> rep(A a, int n) {
  ret repeat(a, n);
}

static <A> L<A> rep(int n, A a) {
  ret repeat(n, a);
}

Author comment

Began life as a copy of #1002222

download  show line numbers  debug dex  old transpilations   

Travelled to 20 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, ekrmjmnbrukm, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mowyntqkapby, mqqgnosmbjvj, odhhsrjjbcgr, podlckwnjdmb, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt, whxojlpjdney, xrpafgyirdlv

No comments. add comment

Snippet ID: #1002635
Snippet name: rep - synonym of repeat
Eternal ID of this version: #1002635/3
Text MD5: c47e64ed58cd0d7ba2a2261dfe23dd9f
Transpilation MD5: d3b28a390340ecc06cccda7711a5c103
Author: stefan
Category:
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-04-13 17:23:43
Source code size: 244 bytes / 15 lines
Pitched / IR pitched: No / No
Views / Downloads: 770 / 1455
Version history: 2 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1007438 - repF - call a function repeatedly, collect into list
#1019335 - repNull
#1033212 - repSimple - synonym of repeat, but n is always first
#3000382 - Answer for ferdie (>> t = 1, f = 0)