mirror of
https://github.com/fredrikr79/advent_of_code.git
synced 2026-04-15 14:30:43 +02:00
2025/2: parallelize nushell part 1
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env nu
|
||||
def part-1 [parsed] {
|
||||
$parsed
|
||||
| each -f {
|
||||
| par-each {
|
||||
|row| where {|x| into string
|
||||
| split chars
|
||||
| take (($in | length) // 2)
|
||||
@@ -9,7 +9,7 @@ def part-1 [parsed] {
|
||||
| try {into int} catch {0}
|
||||
| $in == $x
|
||||
}
|
||||
} | math sum
|
||||
} | flatten | math sum
|
||||
}
|
||||
|
||||
let input = open input
|
||||
|
||||
Reference in New Issue
Block a user