Arc Forumnew | comments | leaders | submitlogin
2 points by rain1 1233 days ago | link | parent

I have been thinking about a modified version of LET that takes a sequence of expressions (like begin) that are either assignments or not assignments. Then it would collect all consecutive assignments together into a letrec. For example:

      (= a 1)
      (= b 2)
      (= c 3)
      (= x 4)
      (= y 5)
would get collected into

      (letrec ((a 1)
               (b 2)
               (c 3))
        (letrec ((x 4)
                 (y 5))
and this "LET" form would take place of the implicit begin we have in most contexts. What do you think? Could it be useful.