Sha256: 4b8d47cb4ef2a94df8229fa35db58271a3a9665891c51ab18403284070aedc56
Contents?: true
Size: 322 Bytes
Versions: 72
Compression:
Stored size: 322 Bytes
Contents
/** * Here is an example solution for the Grains exercise */ component { function square( input ) { if( input <= 0 || input > 64 ) { return -1 } return 2 ^ ( input-1 ); } function total( input ) { var total = 0; loop from=1 to=64 index='local.i' { total += square( i ); } return total; } }
Version data entries
72 entries across 71 versions & 1 rubygems