summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorDan Ellis <dan.ellis@saucelabs.com>2015-11-10 23:31:16 -0800
committerDan Ellis <dan.ellis@saucelabs.com>2015-11-10 23:31:16 -0800
commit1391eed837546e442eeaa48bfae9504b999b8c58 (patch)
tree9b780d4a4f4e810de68dedd2da251516a1274cce
parentae654256e52c842eb396f670245d12e773bcace6 (diff)
Fix variable name typo in dlang examples.
-rw-r--r--d.html.markdown8
1 files changed, 4 insertions, 4 deletions
diff --git a/d.html.markdown b/d.html.markdown
index 6f3710ab..9ebba385 100644
--- a/d.html.markdown
+++ b/d.html.markdown
@@ -53,15 +53,15 @@ void main() {
// For and while are nice, but in D-land we prefer 'foreach' loops.
// The '..' creates a continuous range, including the first value
// but excluding the last.
- foreach(i; 1..1_000_000) {
+ foreach(n; 1..1_000_000) {
if(n % 2 == 0)
- writeln(i);
+ writeln(n);
}
// There's also 'foreach_reverse' when you want to loop backwards.
- foreach_reverse(i; 1..int.max) {
+ foreach_reverse(n; 1..int.max) {
if(n % 2 == 1) {
- writeln(i);
+ writeln(n);
} else {
writeln("No!");
}