Libraryless. Click here for Pure Java version (62L/1K).
1 | static <A> ItIt<A> constIterator(A a) {
|
2 | ret new ItIt<A> {
|
3 | public bool hasNext() { true; }
|
4 | public A next() { ret a; }
|
5 | }; |
6 | } |
Began life as a copy of #1013592
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
| Snippet ID: | #1033626 |
| Snippet name: | constIterator - repeats the same element forever |
| Eternal ID of this version: | #1033626/2 |
| Text MD5: | f91b5914f151412fc0b472859a31744c |
| Transpilation MD5: | 241990697fd1cd4000330f7b0ce8f0c1 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2021-12-15 14:47:13 |
| Source code size: | 138 bytes / 6 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 411 / 515 |
| Version history: | 1 change(s) |
| Referenced in: | [show references] |