aoc2024/day-22/internal/two/sequence.go

8 lines
123 B
Go

package two
type sequence [4]int
func (s *sequence) shift(next int) {
s[0], s[1], s[2], s[3] = s[1], s[2], s[3], next
}