racket / htdp

Other
91 stars 69 forks source link

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

Closed shhyou closed 6 months ago

shhyou commented 6 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 6 months ago

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

shhyou commented 6 months ago

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