Re: Add the numbers in a 9x9 multiplication Table

"B. Pym" <[email protected]> Fri, 6 Jun 2025 00:13:20 -0000 (UTC)
Newsgroups rec.puzzles,comp.lang.lisp,comp.lang.python
Organization A noiseless patient Spider
Message-ID <[email protected]>
Kaz Kylheku wrote:

> 1> (sum-each ((i 1..10) (j 1..10)) (* i j))
> 285
> 2> (sum-each-prod ((i 1..10) (j 1..10)) (* i j))
> 2025

Gauche Scheme

(use srfi-42)

(sum-ec (: i 10) (: j 10) (* i j))
  ===>
2025