---
source: crates/aiken-lang/src/tests/format.rs
description: "Code:\n\npub fn drop(xs: List<a>, n: Int) -> List<a> {\n if n <= 0 {\n xs\n } else {\n when xs is {\n [] ->\n []\n [x] -> [1, 2, 3]\n [_x, ..rest] ->\n drop(rest, n - 1)\n }\n }\n}\n"
---
pub fn drop(xs: List<a>, n: Int) -> List<a> {
if n <= 0 {
xs
} else {
when xs is {
[] -> []
[x] -> [1, 2, 3]
[_x, ..rest] -> drop(rest, n - 1)
}
}
}