• Re: Thanks everyone

    From B. Pym@21:1/5 to Kenny Tilton on Fri Oct 4 01:47:33 2024
    XPost: comp.lang.scheme

    Kenny Tilton wrote:

    Also, I get tired of always writing backwards. A unix pipe sequence of operations A | B | C is written in the order of execution (do A, send
    the result to B, then send that to C and output). In Lisp it's

    (C (B (A foo))). So to do ABC to foo I have to write CBA foo with lots
    of parentheses. Annoying.

    But that is a boring example, because it could just as well be:

    (let (temp)
    (setf temp (a foo))
    (setf temp (b temp))
    (c temp))

    "just as well" ????

    He calls that egregious prolixity "just as well"????

    I don't believe that he has an honest bone in his body.

    He makes a perfect disciple of CL.


    What if A, B and C take multiple inputs? asta la vista pipe, and:

    No.

    Wrong.

    Gauche Scheme:

    (use srfi-197)

    (chain (div-and-mod 26 9) (lrange _ _) (map square _))
    ===>
    (4 9 16 25 36 49)

    (chain (div-and-mod 26 9) (lrange _ _) (map square _)
    (apply values _) (+ _ ...))
    ===>
    139

    Or you can do:

    (c (b (a foo 'up)
    'down)) ;; linebreak overkill?

    ...and it reads like a book. Besides, i think, read, and design
    top-down, not bottom up, even in COBOL.

    A disciple of COBOL makes a perfect disciple of CL.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)