multithreading & sqlite

monkyyy crazymonkyyy at gmail.com
Tue Jan 27 20:26:56 UTC 2026


On Tuesday, 27 January 2026 at 16:38:08 UTC, Lars Johansson wrote:
> This is a prestudy for map&reduce.

strings are the foot gun, use ints and write your own, 
*unannotated* and simple to understand.

using the std algorithms means they will be aviable, but it comes 
with bad naming, the "auto decoding" problems and complexity.

```d
import std;
auto counter(int i){
   struct count{
     int front;
     int end;
     void popFront(){front++;}
     bool empty()=>front>=end;
   }
   return count(0,i);
}
unittest{
   foreach(i;counter(10)){
     i.writeln;
}}

//todo make `counter(5).take(3).map!(a=>a*2)` return [0,2,4]
```




More information about the Digitalmars-d-learn mailing list