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
Then similarly generalise the let syntax, allowing:
let f x y → ...;
let g a b → ...
There is no case for having a letrec analogue of the “first-class function” notation for let, since that would suggest that arbitrary recursive values are permitted:
letrec
f = fun x y → ...;
g = fun a b →
Experimented with desugaring into a syntax such as the above as part of #225. Also consider splitting letrec into two keywords, a la O'Caml.
traditional let x = e in e’ instead of prior "defs" approach , but write in as ;
let rec
drop rec, and assume all named functions recursive
modules as sequences of let and recursive let definitions
allow -> as well as = for consistency with other eliminator occurrences
allow blocks of recursive definitions
non-recursive (anonymous) functions
syntax, semantics and slicing
parsing
The text was updated successfully, but these errors were encountered:
Drop the
fun
keyword fromletrec
, so we have:Then similarly generalise the
let
syntax, allowing:There is no case for having a
letrec
analogue of the “first-class function” notation forlet
, since that would suggest that arbitrary recursive values are permitted:Experimented with desugaring into a syntax such as the above as part of #225. Also consider splitting
letrec
into two keywords, a la O'Caml.let x = e in e’
instead of prior "defs" approach , but writein
as;
let rec
rec
, and assume all named functions recursivelet
and recursivelet
definitions->
as well as=
for consistency with other eliminator occurrencesThe text was updated successfully, but these errors were encountered: