lexi-lambda / racket-r7rs

An implementation of R7RS in Racket
97 stars 14 forks source link

with-input-from-file doesn't exist. #23

Open johannesCmayer opened 2 months ago

johannesCmayer commented 2 months ago

I think this code should work (it works in chibi) but in drracket I get advent_2.rkt:7:3: with-input-from-file: unbound identifier in: with-input-from-file #(91 20)

The weird thing is that drracket still provides a completion for it. Probably I am just making a very dumb mistake.

#lang r7rs

(import (scheme base)
        (scheme write))

(define main (lambda (args)
  (with-input-from-file "data.txt"
    (lambda () 
      (display (read-line))))))