Sha256: 9e393bf2a5afcce5dccc46b53433427ec8004be8c67fd619953f6816b6b1a290

Contents?: true

Size: 218 Bytes

Versions: 159

Compression:

Stored size: 218 Bytes

Contents

local
  fun square n = n * n
  fun sum n = n * (n + 1) div 2
in
  val squareOfSum = square o sum
  fun sumOfSquares n = n * (n + 1) * (2 * n + 1) div 6
  fun differenceOfSquares n = squareOfSum n - sumOfSquares n 
end

Version data entries

159 entries across 159 versions & 1 rubygems

Version Path
trackler-2.2.1.78 tracks/sml/exercises/difference-of-squares/example.sml
trackler-2.2.1.77 tracks/sml/exercises/difference-of-squares/example.sml
trackler-2.2.1.76 tracks/sml/exercises/difference-of-squares/example.sml
trackler-2.2.1.75 tracks/sml/exercises/difference-of-squares/example.sml
trackler-2.2.1.74 tracks/sml/exercises/difference-of-squares/example.sml
trackler-2.2.1.73 tracks/sml/exercises/difference-of-squares/example.sml
trackler-2.2.1.72 tracks/sml/exercises/difference-of-squares/example.sml
trackler-2.2.1.71 tracks/sml/exercises/difference-of-squares/example.sml
trackler-2.2.1.70 tracks/sml/exercises/difference-of-squares/example.sml
trackler-2.2.1.69 tracks/sml/exercises/difference-of-squares/example.sml
trackler-2.2.1.68 tracks/sml/exercises/difference-of-squares/example.sml
trackler-2.2.1.67 tracks/sml/exercises/difference-of-squares/example.sml
trackler-2.2.1.66 tracks/sml/exercises/difference-of-squares/example.sml
trackler-2.2.1.65 tracks/sml/exercises/difference-of-squares/example.sml
trackler-2.2.1.64 tracks/sml/exercises/difference-of-squares/example.sml
trackler-2.2.1.63 tracks/sml/exercises/difference-of-squares/example.sml
trackler-2.2.1.62 tracks/sml/exercises/difference-of-squares/example.sml
trackler-2.2.1.61 tracks/sml/exercises/difference-of-squares/example.sml
trackler-2.2.1.60 tracks/sml/exercises/difference-of-squares/example.sml
trackler-2.2.1.59 tracks/sml/exercises/difference-of-squares/example.sml