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.58 tracks/sml/exercises/difference-of-squares/example.sml
trackler-2.2.1.57 tracks/sml/exercises/difference-of-squares/example.sml
trackler-2.2.1.56 tracks/sml/exercises/difference-of-squares/example.sml
trackler-2.2.1.55 tracks/sml/exercises/difference-of-squares/example.sml
trackler-2.2.1.54 tracks/sml/exercises/difference-of-squares/example.sml
trackler-2.2.1.53 tracks/sml/exercises/difference-of-squares/example.sml
trackler-2.2.1.52 tracks/sml/exercises/difference-of-squares/example.sml
trackler-2.2.1.51 tracks/sml/exercises/difference-of-squares/example.sml
trackler-2.2.1.50 tracks/sml/exercises/difference-of-squares/example.sml
trackler-2.2.1.49 tracks/sml/exercises/difference-of-squares/example.sml
trackler-2.2.1.48 tracks/sml/exercises/difference-of-squares/example.sml
trackler-2.2.1.47 tracks/sml/exercises/difference-of-squares/example.sml
trackler-2.2.1.46 tracks/sml/exercises/difference-of-squares/example.sml
trackler-2.2.1.45 tracks/sml/exercises/difference-of-squares/example.sml
trackler-2.2.1.44 tracks/sml/exercises/difference-of-squares/example.sml
trackler-2.2.1.43 tracks/sml/exercises/difference-of-squares/example.sml
trackler-2.2.1.42 tracks/sml/exercises/difference-of-squares/example.sml
trackler-2.2.1.41 tracks/sml/exercises/difference-of-squares/example.sml
trackler-2.2.1.40 tracks/sml/exercises/difference-of-squares/example.sml
trackler-2.2.1.39 tracks/sml/exercises/difference-of-squares/example.sml