jaror,
jaror avatar

Declarative vs imperative:

let v = sum [ ((x ! i) - m) ^ 2 | i <- [0 .. cc - 1] ] / fromIntegral cc
float v = 0.0f;
for (int i = 0; i < C; i++) {
    float xshift = x[i] - m;
    v += xshift * xshift;
}
v = v/C;
  • All
  • Subscribed
  • Moderated
  • Favorites
  • haskell
  • kavyap
  • InstantRegret
  • ethstaker
  • DreamBathrooms
  • mdbf
  • magazineikmin
  • thenastyranch
  • Youngstown
  • everett
  • slotface
  • osvaldo12
  • khanakhh
  • rosin
  • Durango
  • megavids
  • vwfavf
  • GTA5RPClips
  • cubers
  • tacticalgear
  • tester
  • cisconetworking
  • ngwrru68w68
  • Leos
  • normalnudes
  • provamag3
  • modclub
  • anitta
  • JUstTest
  • All magazines