From d642b6f80d3030ff2bfd8929583aa4b26d129178 Mon Sep 17 00:00:00 2001 From: Matt Nish-Lapidus Date: Fri, 15 Nov 2024 17:54:31 -0500 Subject: [PATCH] peano refactor --- peanomod.ld | 54 ++++++++++++++++++++++++----------------------------- 1 file changed, 24 insertions(+), 30 deletions(-) diff --git a/peanomod.ld b/peanomod.ld index 03fcd6f..fc6cbcd 100644 --- a/peanomod.ld +++ b/peanomod.ld @@ -4,6 +4,8 @@ pw!(5) rt!(0.25) fn y! +fn y_seq! +fn x_seq! & comment for strange Peano variation & uncomment for standard Peano curve @@ -35,55 +37,47 @@ fn f! { fn x! { (0) -> nil (n) -> { - x!(dec(n)) - f!(dec(n)) - y!(dec(n)) - f!(dec(n)) - x!(dec(n)) + x_seq!(n) rt!(0.25) f!(dec(n)) rt!(0.25) - y!(dec(n)) - f!(dec(n)) - x!(dec(n)) - f!(dec(n)) - y!(dec(n)) + y_seq!(n) lt!(0.25) f!(dec(n)) lt!(0.25) - x!(dec(n)) - f!(dec(n)) - y!(dec(n)) - f!(dec(n)) - x!(dec(n)) + x_seq!(n) } } fn y! { (0) -> nil (n) -> { - y!(dec(n)) - f!(dec(n)) - x!(dec(n)) - f!(dec(n)) - y!(dec(n)) + y_seq!(n) lt!(0.25) f!(dec(n)) lt!(0.25) - x!(dec(n)) - f!(dec(n)) - y!(dec(n)) - f!(dec(n)) - x!(dec(n)) + x_seq!(n) rt!(0.25) f!(dec(n)) rt!(0.25) - y!(dec(n)) - f!(dec(n)) - x!(dec(n)) - f!(dec(n)) - y!(dec(n)) + y_seq!(n) } } +fn x_seq! (n) -> { + x!(dec(n)) + f!(dec(n)) + y!(dec(n)) + f!(dec(n)) + x!(dec(n)) +} + +fn y_seq! (n) -> { + y!(dec(n)) + f!(dec(n)) + x!(dec(n)) + f!(dec(n)) + y!(dec(n)) +} + x!(3)