racket / htdp

Other
93 stars 70 forks source link

ASL `let` accepts the named-`let` form #218

Closed shhyou closed 8 months ago

shhyou commented 8 months ago

This program runs in ASL:

#lang htdp/asl
(let loop ([i 0])
  (if (< i 5)
      (+ i (loop (add1 i)))
      0))

However, the named-let form is not documented. Either the documentation missed it, or this should be a syntax error.

mfelleisen commented 8 months ago

It is document as (let name ...) next to recur under the heading "Syntax for Advanced".

shhyou commented 8 months ago

Ah, indeed! I totally missed it. Thanks for pointing it out.