Solution
FeepingCreature
feepingcreature at gmail.com
Tue Oct 18 06:19:59 UTC 2022
On Monday, 17 October 2022 at 11:02:07 UTC, FeepingCreature wrote:
> Trolling a bit: Should this invariant always hold?
>
> assert(equal(range.retro.array, range.array.retro));
>
> Can you find a definition of `range`, using only
> `std.algorithm` verbs (ie. no custom ranges), that violates it?
>
> (And no peeking at my recently-filed bug reports!)
Solution, or rather, Phobos code that violates it (even the
strengthened `assert(equal(range.save.retro.array,
range.save.array.retro))`):
[rot13](https://rot13.com/): `nhgb enatr = bayl(1,
2).havd!"gehr"; // havd onpxjneq vgrengvba purpxf ryrzragf sbe
havdhrarff va gur onpxjneq beqre bs gur haqreylvat enatr.`
More information about the Digitalmars-d
mailing list