Version française
Home     About     Download     Resources     Contact us    
Browse thread
break and continue for OCaml
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Florian Weimer <fw@d...>
Subject: Re: [Caml-list] break and continue for OCaml
* Martin Jambon:

> I'm OK with the intent, but what should happen in such cases:
>
> module A =
> struct
>   let a = break
>   let b = continue
>   let c = return true
>   let d = lazy (return 123)
>   let e () = Lazy.force d
> end

I think break/continue/return should be syntactic constructs (perhaps
using pseudo-keywords), so that "let a = break" is as legal as say,
"let a = end".