Add builtin List.intersperse

This commit is contained in:
satotake 2021-11-17 15:18:45 +00:00 committed by GitHub
parent 8f25106b2c
commit 16fb04b4fa
5 changed files with 120 additions and 0 deletions

View file

@ -3805,6 +3805,17 @@ mod solve_expr {
);
}
#[test]
fn list_intersperse() {
infer_eq_without_problem(
indoc!(
r#"
List.intersperse
"#
),
"List a, a -> List a",
);
}
#[test]
fn function_that_captures_nothing_is_not_captured() {
// we should make sure that a function that doesn't capture anything it not itself captured