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.98 tracks/sml/exercises/difference-of-squares/example.sml
trackler-2.2.1.97 tracks/sml/exercises/difference-of-squares/example.sml
trackler-2.2.1.96 tracks/sml/exercises/difference-of-squares/example.sml
trackler-2.2.1.95 tracks/sml/exercises/difference-of-squares/example.sml
trackler-2.2.1.94 tracks/sml/exercises/difference-of-squares/example.sml
trackler-2.2.1.93 tracks/sml/exercises/difference-of-squares/example.sml
trackler-2.2.1.92 tracks/sml/exercises/difference-of-squares/example.sml
trackler-2.2.1.91 tracks/sml/exercises/difference-of-squares/example.sml
trackler-2.2.1.90 tracks/sml/exercises/difference-of-squares/example.sml
trackler-2.2.1.89 tracks/sml/exercises/difference-of-squares/example.sml
trackler-2.2.1.88 tracks/sml/exercises/difference-of-squares/example.sml
trackler-2.2.1.87 tracks/sml/exercises/difference-of-squares/example.sml
trackler-2.2.1.86 tracks/sml/exercises/difference-of-squares/example.sml
trackler-2.2.1.85 tracks/sml/exercises/difference-of-squares/example.sml
trackler-2.2.1.84 tracks/sml/exercises/difference-of-squares/example.sml
trackler-2.2.1.83 tracks/sml/exercises/difference-of-squares/example.sml
trackler-2.2.1.82 tracks/sml/exercises/difference-of-squares/example.sml
trackler-2.2.1.81 tracks/sml/exercises/difference-of-squares/example.sml
trackler-2.2.1.80 tracks/sml/exercises/difference-of-squares/example.sml
trackler-2.2.1.79 tracks/sml/exercises/difference-of-squares/example.sml