Merge branch 'main' into release
This commit is contained in:
commit
447874cf8e
|
@ -1416,6 +1416,7 @@ fn turtle_listener () -> {
|
||||||
(:position, pid) -> send! (pid, (:reply, do turtle_states > unbox > self () > :position))
|
(:position, pid) -> send! (pid, (:reply, do turtle_states > unbox > self () > :position))
|
||||||
(:penwidth, pid) -> send! (pid, (:reply, do turtle_states > unbox > self () > :penwidth))
|
(:penwidth, pid) -> send! (pid, (:reply, do turtle_states > unbox > self () > :penwidth))
|
||||||
(:heading, pid) -> send! (pid, (:reply, do turtle_states > unbox > self () > :heading))
|
(:heading, pid) -> send! (pid, (:reply, do turtle_states > unbox > self () > :heading))
|
||||||
|
(:state, pid) -> send! (pid, (:reply, do turtle_states > unbox > self ()))
|
||||||
does_not_understand -> {
|
does_not_understand -> {
|
||||||
let pid = self ()
|
let pid = self ()
|
||||||
panic! "{pid} does not understand message: {does_not_understand}"
|
panic! "{pid} does not understand message: {does_not_understand}"
|
||||||
|
@ -1495,6 +1496,10 @@ fn penwidth {
|
||||||
() -> do turtle_states > unbox > :turtle_0 > :penwidth
|
() -> do turtle_states > unbox > :turtle_0 > :penwidth
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn savestate {
|
||||||
|
"Returns the turtle's state."
|
||||||
|
() -> do turtle_states > unbox > :turtle_0
|
||||||
|
}
|
||||||
|
|
||||||
&&& fake some lispisms with tuples
|
&&& fake some lispisms with tuples
|
||||||
fn cons {
|
fn cons {
|
||||||
|
|
BIN
pkg/rudus_bg.wasm
(Stored with Git LFS)
BIN
pkg/rudus_bg.wasm
(Stored with Git LFS)
Binary file not shown.
|
@ -470,8 +470,7 @@ pub fn r#type(x: &Value) -> Value {
|
||||||
pub fn split(source: &Value, splitter: &Value) -> Value {
|
pub fn split(source: &Value, splitter: &Value) -> Value {
|
||||||
match (source, splitter) {
|
match (source, splitter) {
|
||||||
(Value::String(source), Value::String(splitter)) => {
|
(Value::String(source), Value::String(splitter)) => {
|
||||||
println!("splitting {source} with {splitter}");
|
let parts = source.split(splitter.as_str());
|
||||||
let parts = source.split_terminator(splitter.as_str());
|
|
||||||
let mut list = vector![];
|
let mut list = vector![];
|
||||||
for part in parts {
|
for part in parts {
|
||||||
list.push_back(Value::String(Rc::new(part.to_string())));
|
list.push_back(Value::String(Rc::new(part.to_string())));
|
||||||
|
|
Loading…
Reference in New Issue
Block a user