ZILtoid1991@lemmy.world to Programmer Humor@programming.dev · 12 days agoUncle Bob becoming even worse:lemmy.worldimagemessage-square226linkfedilinkarrow-up1550arrow-down112
arrow-up1538arrow-down1imageUncle Bob becoming even worse:lemmy.worldZILtoid1991@lemmy.world to Programmer Humor@programming.dev · 12 days agomessage-square226linkfedilink
minus-squareThirdConsul@lemmy.ziplinkfedilinkarrow-up2·11 days agoPure function = no side effects, no internal state. If you run a pure function twice with the same input, it will give the same output. Example of pure function (a,b) => a+b Example of inpure function let c; (a, b) => { c++; return a+b; }
Pure function = no side effects, no internal state. If you run a pure function twice with the same input, it will give the same output.
Example of pure function
Example of inpure function
let c; (a, b) => { c++; return a+b; }