Another possibility is:
let x = List.map begin fun z -
very_blabla
end my_list in
It's quite compact, doesn't run into the margin, is consistent with
tuareg, but might be less readable.
--
Romain Bardou
Dave Benjamin a écrit :
Romain Bardou wrote:
let x = List.map (fun z -
Using labels makes this kind of code more readable.
open StdLabels
let x = List.map my_list ~f:
begin fun z -
very_blabla
end in
...
Jacques Garrigue
From: DooMeeR [EMAIL PROTECTED]
Another possibility is:
let x = List.map begin fun z -
very_blabla
end my_list in
DooMeeR wrote:
Another possibility is:
let x = List.map begin fun z -
very_blabla
end my_list in
It's quite compact, doesn't run into the margin, is consistent with
tuareg, but might be less readable.
Now I generally tend to use this:
let x =
List.map (
fun z -
very_blabla
Daniel Bünzli wrote:
Le 25 oct. 08 à 14:43, Martin Jambon a écrit :
Now I generally tend to use this:
let x =
List.map (
fun z -
very_blabla
...
) my_list
in
I think the best solution is to name your anonymous function, as the
guidelines suggest [1].
It says: