peano refactor
This commit is contained in:
parent
d5b451b101
commit
d642b6f80d
54
peanomod.ld
54
peanomod.ld
|
@ -4,6 +4,8 @@ pw!(5)
|
||||||
rt!(0.25)
|
rt!(0.25)
|
||||||
|
|
||||||
fn y!
|
fn y!
|
||||||
|
fn y_seq!
|
||||||
|
fn x_seq!
|
||||||
|
|
||||||
& comment for strange Peano variation
|
& comment for strange Peano variation
|
||||||
& uncomment for standard Peano curve
|
& uncomment for standard Peano curve
|
||||||
|
@ -35,55 +37,47 @@ fn f! {
|
||||||
fn x! {
|
fn x! {
|
||||||
(0) -> nil
|
(0) -> nil
|
||||||
(n) -> {
|
(n) -> {
|
||||||
x!(dec(n))
|
x_seq!(n)
|
||||||
f!(dec(n))
|
|
||||||
y!(dec(n))
|
|
||||||
f!(dec(n))
|
|
||||||
x!(dec(n))
|
|
||||||
rt!(0.25)
|
rt!(0.25)
|
||||||
f!(dec(n))
|
f!(dec(n))
|
||||||
rt!(0.25)
|
rt!(0.25)
|
||||||
y!(dec(n))
|
y_seq!(n)
|
||||||
f!(dec(n))
|
|
||||||
x!(dec(n))
|
|
||||||
f!(dec(n))
|
|
||||||
y!(dec(n))
|
|
||||||
lt!(0.25)
|
lt!(0.25)
|
||||||
f!(dec(n))
|
f!(dec(n))
|
||||||
lt!(0.25)
|
lt!(0.25)
|
||||||
x!(dec(n))
|
x_seq!(n)
|
||||||
f!(dec(n))
|
|
||||||
y!(dec(n))
|
|
||||||
f!(dec(n))
|
|
||||||
x!(dec(n))
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn y! {
|
fn y! {
|
||||||
(0) -> nil
|
(0) -> nil
|
||||||
(n) -> {
|
(n) -> {
|
||||||
y!(dec(n))
|
y_seq!(n)
|
||||||
f!(dec(n))
|
|
||||||
x!(dec(n))
|
|
||||||
f!(dec(n))
|
|
||||||
y!(dec(n))
|
|
||||||
lt!(0.25)
|
lt!(0.25)
|
||||||
f!(dec(n))
|
f!(dec(n))
|
||||||
lt!(0.25)
|
lt!(0.25)
|
||||||
x!(dec(n))
|
x_seq!(n)
|
||||||
f!(dec(n))
|
|
||||||
y!(dec(n))
|
|
||||||
f!(dec(n))
|
|
||||||
x!(dec(n))
|
|
||||||
rt!(0.25)
|
rt!(0.25)
|
||||||
f!(dec(n))
|
f!(dec(n))
|
||||||
rt!(0.25)
|
rt!(0.25)
|
||||||
y!(dec(n))
|
y_seq!(n)
|
||||||
f!(dec(n))
|
|
||||||
x!(dec(n))
|
|
||||||
f!(dec(n))
|
|
||||||
y!(dec(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)
|
x!(3)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user