Skip to content

Sharing problem when --enable-self-tail used #341

Description

@samdphillips

This program does not print the same output when --enable-self-tail is used.

#lang racket/base 

(define xs
  (list (list 1 2 3 4 5)
        (list 5 4 3 2 1)))

(let loop ([xs xs]
           [f void])
  (cond
    [(null? xs) (f)]
    [else
     (define x (car xs))
     (loop (cdr xs)
           (λ ()
             (displayln x)
             (f)))]))

When the flag is not used (or when running the code in Racket) the output is:

(5 4 3 2 1)
(1 2 3 4 5)

When the flag is used the output is:

(5 4 3 2 1)
(5 4 3 2 1)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions