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