static S textOut_or_curly(L<S> l) { ret textOut_or_curly(l, "nothing"); } static S textOut_or_curly(L<S> l, S emptyText) { if (empty(l)) ret emptyText; L<S> separators = rep(", ", l(l)-2); separators.add(" or "); ret join_flex(separators, map curlyOpt(l)); }
Began life as a copy of #1017496
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1017503 | 
| Snippet name: | textOut_or_curly - join strings as "a, b or c" | 
| Eternal ID of this version: | #1017503/1 | 
| Text MD5: | 04d3740bbe29c3f209fa8ebd95b5124c | 
| Author: | stefan | 
| Category: | javax / a.i. | 
| Type: | JavaX fragment (include) | 
| Public (visible to everyone): | Yes | 
| Archived (hidden from active list): | No | 
| Created/modified: | 2018-07-24 01:40:22 | 
| Source code size: | 278 bytes / 10 lines | 
| Pitched / IR pitched: | No / No | 
| Views / Downloads: | 553 / 594 | 
| Referenced in: | [show references] |