Warning: session_start(): open(/var/lib/php/sessions/sess_honv5rl2v1ln8j368gs2sufcbc, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51

Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
iota_zero - count from 0 to n-1 (iterator) [1027215]

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

8
LINES

< > BotCompany Repo | #1027215 // iota_zero - count from 0 to n-1 (iterator)

JavaX fragment (include)

static ItIt<Int> iota_zero(final int n) {
  ret new ItIt<Int>() {
    int i = 0;
    
    public bool hasNext() { ret i < n; }
    public Int next() { ret i++; }
  };
}

Author comment

Began life as a copy of #1015352

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1027215
Snippet name: iota_zero - count from 0 to n-1 (iterator)
Eternal ID of this version: #1027215/1
Text MD5: 41ddd25b8590b3fa6e30f2909c246ef8
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-02-26 12:27:11
Source code size: 175 bytes / 8 lines
Pitched / IR pitched: No / No
Views / Downloads: 639 / 670
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)