Is it possible to print full list without using cycle? I tried:
Console.WriteLine([1;2;3;4;5])
and it prints only three first elements:
No it's not possible to print the contents of an F# list without using a cycle / loop of sorts. To print every element you must enumerate each of them.
In F# though it doesn't need to be done with a loop though but instead can be done with a nice pipe operation
[1;2;3;4;5] |> Seq.iter (fun x -> printf "%d " x)
And as Juliet pointed out I could simplify this further with partial application
[1;2;3;4;5] |> Seq.iter (printf "%d ")