mirror of
https://github.com/helix-editor/helix
synced 2026-08-03 14:04:12 +02:00
This will be used by the cargo indent-check xtask to validate queries, similar to the existing indent tests in helix-core.
16 lines
196 B
R
16 lines
196 B
R
f <- function(x) {
|
|
total <- 0
|
|
for (v in x) {
|
|
if (v > 0) {
|
|
total <- total + v
|
|
} else {
|
|
total <- total - v
|
|
}
|
|
}
|
|
result <- lapply(
|
|
items,
|
|
process
|
|
)
|
|
total
|
|
}
|