I would like to correctly annotate my functions with pure. I've hit a function that is calling chain which breaks purity. Is chain really not pure?

The relevant section of code is:

      ...
auto sortedRage = assumeSorted!("a.when < b.when")(opSlice());
      auto trisection = sortedRage.trisect(needle);
      auto ccRate = Rate(0.0);

      if(trisection[0].length) {
        ccRate = trisection[0][$-1].value;
      }
      foreach(dateRate; chain(trisection[1], trisection[2])) {
      ...

Is there a reasonable work around?

Thanks
Dan

Reply via email to