diff options
author | Braxton Hall | 2022-10-25 06:14:28 +0000 |
---|---|---|
committer | GitHub | 2022-10-25 06:14:28 +0000 |
commit | 4a1bbcf2af6ff77bdbab0d9744453949e95b6b9b (patch) | |
tree | d3a998399e3a2487f62c5488f0a9303d534b5695 /entries/lilylin/fractran/src/main.rs | |
parent | bd57417ffbfbb4c8cce53465835ddc9bdfa86dc9 (diff) | |
parent | bea8092ecca8f4bf61a4df88c06f4eeb61ab3a56 (diff) |
Merge pull request #37 from rctcwyvrn/lily
Lily's entries
Diffstat (limited to 'entries/lilylin/fractran/src/main.rs')
-rw-r--r-- | entries/lilylin/fractran/src/main.rs | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/entries/lilylin/fractran/src/main.rs b/entries/lilylin/fractran/src/main.rs new file mode 100644 index 0000000..a874e1d --- /dev/null +++ b/entries/lilylin/fractran/src/main.rs @@ -0,0 +1,28 @@ +#![feature(int_log)] + +use crate::core::Program; + +use anyhow::Ok; +use anyhow::Result; +use engines::register::Register; + +mod core; +mod engines; + +fn execute_fib() { + for i in 1..15 { + let engine = Register { + program: Program::fibonacci(i), + output_base: 2, + }; + let n = 1; + for val in engine.into_iter().take(n) { + print!("{:?},", val); + } + } +} + +fn main() -> Result<()> { + execute_fib(); + return Ok(()); +} |