diff --git a/docs/conceptual/snippets/fssequences/snippet180.fs b/docs/conceptual/snippets/fssequences/snippet180.fs index a7e58367..91901848 100644 --- a/docs/conceptual/snippets/fssequences/snippet180.fs +++ b/docs/conceptual/snippets/fssequences/snippet180.fs @@ -1,10 +1,14 @@ + let printSeq seq1 = + for v in seq1 do printf "%A " v + printfn "" - let seqNumbers = [ 1.0; 1.5; 2.0; 1.5; 1.0; 1.5 ] :> seq + let seqNumbers = [ 1.0; 1.5; 2.0; 1.5; 1.0; 1.5 ] let seqWindows = Seq.windowed 3 seqNumbers let seqMovingAverage = Seq.map Array.average seqWindows + printfn "Initial sequence: " printSeq seqNumbers printfn "\nWindows of length 3: " printSeq seqWindows printfn "\nMoving average: " - printSeq seqMovingAverage \ No newline at end of file + printSeq seqMovingAverage