Skip to content

Commit 9680224

Browse files
author
Mike J H
committed
increasing complexity for BBC
1 parent eed2990 commit 9680224

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

src/bin/leds.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#![no_main]
22
#![no_std]
3-
// please don not expect this to compile properly under geany without more assistance
3+
// please do not expect this to compile properly under geany without more assistance
44
extern crate panic_halt;
55
// github.com therealprof / microbit
66
use core::fmt::Write;
@@ -65,6 +65,11 @@ fn main() -> ! {
6565
leds.display(&mut delay, checker_a, 1000);
6666
leds.display(&mut delay, checker_b, 1000);
6767
}
68+
let mut j = 0 ;
69+
(0..5).flat_map(|x| x * 100 .. x * 110)
70+
.enumerate()
71+
.filter(|&(i, x)| (i + x) % 3 == 0)
72+
.for_each(|(i, x)| j=x); // try these on BBC build
6873
}
6974
panic!();
7075
}

src/bin/leds2.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,11 @@ fn main() -> ! {
6565
leds.display(&mut delay, checker_a, 1000);
6666
leds.display(&mut delay, checker_b, 1000);
6767
}
68+
let mut j = 0 ;
69+
(0..5).flat_map(|x| x * 100 .. x * 110)
70+
.enumerate()
71+
.filter(|&(i, x)| (i + x) % 3 == 0)
72+
.for_each(|(_i, x)| j=x); // try these on BBC build
6873
}
6974
panic!();
7075
}

0 commit comments

Comments
 (0)