Sum of squares
If this expression seems puzzling, note that * ** 2
is equivalent to {$^x ** 2}
— the leftmost asterisk is not the multiplication operator but the Whatever
star, which specifies currying behavior. Another convenient way to distribute the exponentiation is via the cross metaoperator, which as a list infix is looser than comma in precedence but tighter than the reduction list operator:
PreviousSum of square and cube digits of an integer are primesNextSum of the digits of n is substring of n
Last updated