peano refactor

This commit is contained in:
Matt Nish-Lapidus 2024-11-15 17:54:31 -05:00
parent d5b451b101
commit d642b6f80d

View File

@ -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)