Sha256: d4a6d630525d0d1c7ec281b1c960dd3a524b19b5f02c3041d0ea5921b7fbfa2d
Contents?: true
Size: 418 Bytes
Versions: 392
Compression:
Stored size: 418 Bytes
Contents
square(1, 1) :- !. square(SquareNumber, Value) :- SquareNumber > 1, not(SquareNumber > 64), NextSquare is SquareNumber - 1, square(NextSquare, NewValue), Value is 2 * NewValue, !. total(Total) :- total(Total, 64). total(0, 0) :- !. total(Total, Square) :- NextSquare is Square - 1, total(NextTotal, NextSquare), square(Square, SquareValue), Total is NextTotal + SquareValue.
Version data entries
392 entries across 392 versions & 1 rubygems