Compare commits
2 Commits
a5e1aad83d
...
3527530e39
Author | SHA1 | Date | |
---|---|---|---|
|
3527530e39 | ||
|
a534e241f9 |
|
@ -920,7 +920,7 @@ fn get {
|
|||
fn update {
|
||||
"Takes a dict, key, and function, and returns a new dict with the key set to the result of applying the function to original value held at the key."
|
||||
(d as :dict) -> d
|
||||
(d as :dict, k as :keyword, updater as :fn) -> assoc (d, k, updater (get (k, d)))
|
||||
(d as :dict, k as :keyword, updater as :fn) -> assoc (d, k, updater (get (d, k)))
|
||||
}
|
||||
|
||||
fn keys {
|
||||
|
@ -974,7 +974,7 @@ fn random {
|
|||
}
|
||||
(d as :dict) -> {
|
||||
let key = do d > keys > random
|
||||
get (key, d)
|
||||
get (d, key)
|
||||
}
|
||||
& (s as :set) -> do s > list > random
|
||||
}
|
||||
|
|
|
@ -306,7 +306,7 @@ function __wbg_get_imports() {
|
|||
const ret = false;
|
||||
return ret;
|
||||
};
|
||||
imports.wbg.__wbindgen_closure_wrapper1087 = function(arg0, arg1, arg2) {
|
||||
imports.wbg.__wbindgen_closure_wrapper1088 = function(arg0, arg1, arg2) {
|
||||
const ret = makeMutClosure(arg0, arg1, 356, __wbg_adapter_18);
|
||||
return ret;
|
||||
};
|
||||
|
|
Binary file not shown.
|
@ -156,7 +156,7 @@ fn traceback(panic: &Panic) -> String {
|
|||
fn frame_info(frame: &CallFrame) -> String {
|
||||
let span = frame.chunk().spans[if frame.ip == 0 { 0 } else { frame.ip - 1 }];
|
||||
let line_number = line_number(frame.chunk().src, span);
|
||||
console_log!("ip: {} | span: {span} | line: {line_number}", frame.ip);
|
||||
// console_log!("ip: {} | span: {span} | line: {line_number}", frame.ip);
|
||||
let line = get_line(frame.chunk().src, line_number);
|
||||
let line = line.trim_start();
|
||||
let name = frame.function.as_fn().name();
|
||||
|
|
|
@ -40,7 +40,13 @@ impl LFn {
|
|||
pub fn patterns(&self) -> Value {
|
||||
match self {
|
||||
LFn::Declared { .. } => unreachable!(),
|
||||
LFn::Defined { patterns, .. } => Value::from_string(patterns.join(" | ")),
|
||||
LFn::Defined { patterns, .. } => Value::from_string(
|
||||
patterns
|
||||
.iter()
|
||||
.map(|pattern| format!(" {pattern}"))
|
||||
.collect::<Vec<_>>()
|
||||
.join("\n"),
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user