Skip to content

Commit

Permalink
fix example for Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
9il committed May 1, 2015
1 parent b3d65ad commit e57fab0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions examples/readdoubles2.d
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@ import std.array : array;
import std.conv : to;
import std.range : takeExactly, tee;
import std.stdio;
import std.string : chomp;

void main()
{
double mean = 0;
auto sample = File("10numbers.txt")
.byLine
.takeExactly(10)
.map!chomp // removes trailing '\r'
.map!(to!double)
.tee!((x){mean += x;})
.array;
Expand Down

0 comments on commit e57fab0

Please sign in to comment.