Finadil@lemmy.world to linuxmemes@lemmy.worldEnglish · 4 months agoNever go full cringelemmy.worldimagemessage-square30fedilinkarrow-up1268arrow-down115file-text
arrow-up1253arrow-down1imageNever go full cringelemmy.worldFinadil@lemmy.world to linuxmemes@lemmy.worldEnglish · 4 months agomessage-square30fedilinkfile-text
Has my motd gone too far? It loads a random ANSI catgirl from a folder. I use arch btw, server runs minimized Ubuntu Server.
minus-square__dev@lemmy.worldlinkfedilinkarrow-up7·4 months ago but .for_each(|((_, , t), (, _, b))| { … } just looks like an abomination It’s not so different in python: for ((_, _, t), (_, _, b)) in zip(top, bottom): Or in C#: .ForEach(((_, _, t), (_, _, b)) => Console.Write(...));
minus-squarertxn@lemmy.worldMlinkfedilinkarrow-up4·4 months agoIs | (...) | { ... } a lambda expression then?
minus-squareIgnotum@lemmy.worldlinkfedilinkarrow-up2·4 months agoYep, lambda or closure (it’s an anonymous function but it can also capture state from the enclosing function, i think pure lambdas can’t do that?)
It’s not so different in python:
for ((_, _, t), (_, _, b)) in zip(top, bottom):Or in C#:
.ForEach(((_, _, t), (_, _, b)) => Console.Write(...));Is
| (...) | { ... }a lambda expression then?Yep, lambda or closure (it’s an anonymous function but it can also capture state from the enclosing function, i think pure lambdas can’t do that?)