Consider the two examples below:
let myList = [0..10]
List.map (fun x -> x + 5)
(List.filter (fun x -> x % 3 = 0) myList)
and
let myList = [0..10]
List.map (fun x -> x + 5) (List.filter (fun x -> x % 3 = 0) myList)
Both examples produce the same result:
val myList : int list = [0; 1; 2; 3; 4; 5; 6; 7; 8; 9; 10]
val it : int list = [5; 8; 11; 14]
F# being a white-space sensitive language, is there technically a difference between these two examples?
I think F# Code Formatting Guidelines is very helpful for you, especially the first section about General rules for indentation.
Here is a relevant excerpt from the page:
So indentation in the first example helps F# compiler parse your example correctly.
No. Two code fragments have the same meaning here; the only difference is readability. I prefer the first one since my eyes don’t have to go to far right to read the whole function.
Sometimes when a line is too long, you could reorder arguments using pipes and break that line to multiple ones:
UPDATE:
I took some time to aggregate information from different sources and wrote up a comprehensive guide to F# Formatting Conventions; you might want to look into it.