HashConstants hashes a slice of constants.
(constants []Constant)
| 840 | |
| 841 | // HashConstants hashes a slice of constants. |
| 842 | func HashConstants(constants []Constant) uint64 { |
| 843 | if len(constants) == 0 { |
| 844 | return 0 |
| 845 | } |
| 846 | h := constants[0].Hash() |
| 847 | for _, snd := range constants[1:] { |
| 848 | h = szudzikElegantPair(h, snd.Hash()) |
| 849 | } |
| 850 | return h |
| 851 | } |
| 852 | |
| 853 | // EqualsConstants compares two slices of constants. |
| 854 | func EqualsConstants(left []Constant, right []Constant) bool { |
no test coverage detected