• Re: Collection utilities

    From B. Pym@Nobody447095@here-nor-there.org to comp.lang.lisp,comp.lang.scheme on Sat Sep 7 02:25:31 2024
    From Newsgroup: comp.lang.scheme

    Software Scavenger wrote:

    LOOP is powerful, general, and standard. E.g.

    CL-USER 5 > (loop as i below 5 collect i collect (* i 2))
    (0 0 1 2 2 4 3 6 4 8)

    Gauche Scheme

    (use srfi-42) ; append-ec

    (append-ec (: i 5) (list i (* i 2)))

    (0 0 1 2 2 4 3 6 4 8)
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From B. Pym@Nobody447095@here-nor-there.org to comp.lang.lisp,comp.lang.scheme on Thu Jun 26 01:23:34 2025
    From Newsgroup: comp.lang.scheme

    B. Pym wrote:

    Software Scavenger wrote:

    LOOP is powerful, general, and standard. E.g.

    CL-USER 5 > (loop as i below 5 collect i collect (* i 2))
    (0 0 1 2 2 4 3 6 4 8)

    Gauche Scheme

    (use srfi-42) ; append-ec

    (append-ec (: i 5) (list i (* i 2)))

    (0 0 1 2 2 4 3 6 4 8)

    Shorter yet.

    (append-ec (: i 5) `(,i ,(* i 2)))


    --- Synchronet 3.22a-Linux NewsLink 1.2