mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 13:29:12 +00:00
List.get with negative index in repl
This commit is contained in:
parent
917e0e2027
commit
b0d57587e3
8 changed files with 109 additions and 33 deletions
|
@ -117,14 +117,13 @@ impl<'a> ReplApp<'a> for CliApp {
|
|||
main_fn_name: &str,
|
||||
ret_bytes: usize,
|
||||
mut transform: F,
|
||||
) -> T
|
||||
) -> Option<T>
|
||||
where
|
||||
F: FnMut(&'a Self::Memory, usize) -> T,
|
||||
Self::Memory: 'a,
|
||||
{
|
||||
run_jit_function_dynamic_type!(self.lib, main_fn_name, ret_bytes, |v| transform(
|
||||
&CliMemory, v
|
||||
))
|
||||
let mut t = |v| transform(&CliMemory, v);
|
||||
run_jit_function_dynamic_type!(self.lib, main_fn_name, ret_bytes, t)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue