isEven(0) ->
true;
isEven(Num) ->
isOdd(Num-1).
isOdd(0) ->
false;
isOdd(Num) ->
isEven(Num-1).
- 0 Posts
- 51 Comments
FiskFisk33@startrek.websiteto TenForward: Where Every Vulcan Knows Your Name@lemmy.world•The Measure of a 🫳🎤9·1 month ago“don’t build the torment nexus”
FiskFisk33@startrek.websiteto TenForward: Where Every Vulcan Knows Your Name@lemmy.world•The Measure of a 🫳🎤26·1 month agoAsimov himself wrote a book on how those laws don’t work.
FiskFisk33@startrek.websiteto Programmer Humor@programming.dev•I got to avoid memory management for quite some time7·1 month agoit is good to learn C, even if you’re never gonna touch it again. It teaches you what other languages abstract away.
FiskFisk33@startrek.websiteto Programmer Humor@programming.dev•We don't talk about IPv519·2 months agofun fact, the RFC introducing NAT calls it a “short-term solution”
porque no los dos?
wait, does windows jit compile C++ ??
FiskFisk33@startrek.websiteto TenForward: Where Every Vulcan Knows Your Name@lemmy.world•Picard doesn't count, what with his family's fancy-shmancy chateau and vineyard23·4 months agoIf you had teleportation available for transport, wouldn’t you move into the middle of nowhere?
FiskFisk33@startrek.websiteto Programmer Humor@programming.dev•I'm gonna refactor later.181·5 months agobut it removed half the point…?
i know this is a joke, but i find it quite interesting those two words have completely different etymologies.
Grave as in burial site comes from an old proto indo european word for “dig”, while grave as in serious comes from french.
I mean, sure, you won’t stay alive for very long with a stopped heart.
I meant like, when someones heart stops and gets restarted again with cpr or a defibrillator or something. People often call that being dead, and coming back.
people say quitting smoking is hard. I don’t understand, I do it multiple times a day.
I know this is a definition in many places. I find it stupid and useless.
The heart beating is not a good definition of being alive in my opinion. The heart stopping temporarily doesn’t mean you died, you were just in terribly grave danger.
If a person is defined by their heart, what does that make a heart transplant?
utterly useless definition.
oh god the reason is even stupider then I expected
Because large numbers use the
e
character in their string representation (e.g.,6.022e23
for 6.022 × 1023), usingparseInt
to truncate numbers will produce unexpected results when used on very large or very small numbers.parseInt
should not be used as a substitute forMath.trunc()
.
https://www.npmjs.com/package/is-even
don’t look at the weekly downloads if you are faint of heart.