• Re: Add the numbers in a 9x9 multiplication Table

    From B. Pym@Nobody447095@here-nor-there.org to rec.puzzles,comp.lang.lisp,comp.lang.python on Fri Jun 6 00:13:20 2025
    From Newsgroup: comp.lang.python

    Kaz Kylheku wrote:

    (sum-each ((i 1..10) (j 1..10)) (* i j))
    285
    (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
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From B. Pym@Nobody447095@here-nor-there.org to rec.puzzles,comp.lang.lisp,comp.lang.python on Fri Jun 6 15:25:51 2025
    From Newsgroup: comp.lang.python

    B. Pym wrote:

    Kaz Kylheku wrote:

    (sum-each ((i 1..10) (j 1..10)) (* i j))
    285
    (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


    Equivalent but more prolix:

    (sum-ec (:range i 0 10) (:range j 0 10) (* i j))

    --- Synchronet 3.21a-Linux NewsLink 1.2