• .Re: Seeking computer-programming job (Sunnyvale, CA)

    From Robert L.@21:1/5 to All on Sat Feb 19 10:25:54 2022
    Anaphoric macros are extremely useful. There's a hidden anaphor in the
    CL loop macro, which binds the value of IT onto a previously-evaluated conditional. In other words, within a loop, you can say something like

    (loop
    for x in list-of-things
    when (find x other-list) collect it)

    (defun fn (n)
    (let ((x (/ n 3)))
    (and (integerp x) x)))

    (loop
    for x in '(2 3 4 5 6 8 9)
    when (fn x) collect it)

    (1 2 3)


    Gauche Scheme and Racket:

    (define (fn n)
    (let ((x (/ n 3)))
    (and (integer? x) x)))

    (filter-map fn '(2 3 4 5 6 8 9))
    ===>
    (1 2 3)

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