Skip to content
This repository has been archived by the owner on Mar 28, 2023. It is now read-only.

Support mutually recursive local definitions (let rec) #16

Open
robotlolita opened this issue Jul 29, 2017 · 0 comments
Open

Support mutually recursive local definitions (let rec) #16

robotlolita opened this issue Jul 29, 2017 · 0 comments

Comments

@robotlolita
Copy link
Owner

Currently let introduces a new scope, so it's not possible to write mutually recursive definitions:

let x = y in
let y = 1 in
x

Will give you a y is not defined error, since y is not in x's scope. The solution for this is to introduce all definitions at the same time (we don't need a rec modifier since all bindings are lazily evaluated anyway):

let x = y
let y = 1
in x
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant