Destide ( sirico@feddit.uk ) to Programmer Humor@lemmy.mlEnglish · 1 year agoInfallible Codelemmy.mlimagemessage-square36linkfedilinkarrow-up1273
arrow-up1273imageInfallible Codelemmy.mlDestide ( sirico@feddit.uk ) to Programmer Humor@lemmy.mlEnglish · 1 year agomessage-square36linkfedilink
minus-squarebalsoft ( balsoft@lemmy.ml ) linkfedilinkarrow-up8·1 year agoI mean, it would be almost this exact thing in almost any language. fn is_even(n: i64) -> bool { n % 2 == 0 } even n = n `rem` 2 == 0 def is_even(n): return n % 2 == 0 etc
I mean, it would be almost this exact thing in almost any language.
fn is_even(n: i64) -> bool { n % 2 == 0 }def is_even(n): return n % 2 == 0etc