diff --git a/2024/aggregate.go b/2024/aggregate.go new file mode 100644 index 0000000..8c71d88 --- /dev/null +++ b/2024/aggregate.go @@ -0,0 +1,19 @@ +package adventoc2024 + +func anyt(b []bool) bool { + for i := range b { + if b[i] { + return true + } + } + return false +} + +func allt(b []bool) bool { + for i := range b { + if !b[i] { + return false + } + } + return true +}