You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.
Currently, one must always name a function when defining it, but in the case where we wish to return a function from within a function (or otherwise utilse first class functions) this is inelegant.
Consider the following definition (which will get through codegen, but won't compile - see #68 )
fun areaOfCircle(pie: f64) -> fun(f64) -> f64 {
fun f(r: f64) -> f64 {
return pie * (r * r)
}
return f
}
Ideally it would look like this:
fun areaOfCircle(pie: f64) -> fun(f64) -> f64 {
return fun (r: f64) -> f64 {
return pie * (r * r)
}
}
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Commit: f2107d4
Currently, one must always name a function when defining it, but in the case where we wish to return a function from within a function (or otherwise utilse first class functions) this is inelegant.
Consider the following definition (which will get through codegen, but won't compile - see #68 )
Ideally it would look like this:
The text was updated successfully, but these errors were encountered: