Summary

Append-map sideeffects

Metadata

Description

(require-extension srfi-1) (define (pz lis)

 (append-map
  (lambda (x) (map (lambda (y)
                     (print y)
                     (cons x y))
                   (pz (remove (lambda (y) (eq? y x)) lis))))
  lis))

(pz '(a b c d))

; this is on 5.3.0.
; prints nothing. But if it's map instead of append-map, it prints stuff.

Changes and comments

[2024-03-07 07:32:07 UTC] Idiomdrottning changed status from new to closed

[2024-03-07 07:32:07 UTC] Idiomdrottning set resolution to invalid

[2024-03-07 07:32:07 UTC] Idiomdrottning wrote:

Pebcak as per ushe.