Change parameters to List.concat. Now it is less dependent on &args

This commit is contained in:
Chad Stearns 2020-08-19 02:00:40 -04:00
parent a99adb9cdb
commit 2f2763351d
2 changed files with 12 additions and 9 deletions

View file

@ -1631,7 +1631,15 @@ fn run_low_level<'a, 'ctx, 'env>(
list_reverse(env, parent, scope, list)
}
ListConcat => list_concat(env, scope, parent, args),
ListConcat => {
debug_assert_eq!(args.len(), 2);
let (first_list, list_layout) = load_symbol_and_layout(env, scope, &args[0]);
let second_list = load_symbol(env, scope, &args[1]);
list_concat(env, parent, first_list, second_list, list_layout)
}
ListAppend => {
// List.append : List elem, elem -> List elem
debug_assert_eq!(args.len(), 2);