aboutsummaryrefslogtreecommitdiff
path: root/entries/lilylin/fractran/src/main.rs
diff options
context:
space:
mode:
authorfunemy2022-10-25 07:14:52 +0000
committerfunemy2022-10-25 07:14:52 +0000
commit998ef837b43203319397f191036a97a5adc42220 (patch)
tree920558bd60d282c663fd2da1cd4144cac1849a1d /entries/lilylin/fractran/src/main.rs
parentfdac6c60e115297a58f5b81da0c4b7f18ac758f2 (diff)
parentce7544a6db594f7d3dfad0d7dc65d01515e57ad6 (diff)
Merge branch 'main' of github.com:braxtonhall/fib
Diffstat (limited to 'entries/lilylin/fractran/src/main.rs')
-rw-r--r--entries/lilylin/fractran/src/main.rs28
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(());
+}