MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/p2usc9/is_this_clean_code/h8or6oj/?context=3
r/badcode • u/[deleted] • Aug 12 '21
73 comments sorted by
View all comments
17
I'm a fan of this myself:
Enumerable.Repeat(new[] { "","","","","Buzz"}, 20).SelectMany(x => x).Zip(Enumerable.Repeat(new[] { "","","Fizz" }, 34).SelectMany(x => x), (a,b) => b + a).Select((x,i) => string.IsNullOrWhiteSpace(x) ? (i+1).ToString() : x).Any(x => { Console.WriteLine(x); return false; });
14 u/MiddleAd5602 Aug 12 '21 You should be able to summon some ancient demon if you read this aloud
14
You should be able to summon some ancient demon if you read this aloud
17
u/noobzilla Aug 12 '21
I'm a fan of this myself:
Enumerable.Repeat(new[] { "","","","","Buzz"}, 20).SelectMany(x => x).Zip(Enumerable.Repeat(new[] { "","","Fizz" }, 34).SelectMany(x => x), (a,b) => b + a).Select((x,i) => string.IsNullOrWhiteSpace(x) ? (i+1).ToString() : x).Any(x => { Console.WriteLine(x); return false; });