On Thursday, 21 May 2015 at 23:14:47 UTC, Dennis Ritchie wrote:
On Thursday, 21 May 2015 at 21:35:22 UTC, Ali Çehreli wrote:We're almost there. :)bool is_between(T0, T1, T2)(T0 what, T1 min, T2 max) { return (what >= min) && (what <= max); } void main() { if (5.is_between(4, 6)) { // ... } } AliA condition is that if, for example, that? :) if (5 > 2 > -9 > -13 < 10 == 10 < 21 != 45): print("OK")
this looks like gibberish upon first sight and is not something I'd want to see in code I inherit.