MCPcopy Create free account
hub / github.com/copernet/copernicus / CountBool

Method CountBool

util/stack.go:96–104  ·  view source on GitHub ↗
(val bool)

Source from the content-addressed store, hash-verified

94}
95
96func (s *Stack) CountBool(val bool) int {
97 var count int
98 for _, e := range s.array {
99 if v, ok := e.(bool); ok && v == val {
100 count++
101 }
102 }
103 return count
104}
105
106func Swap(s *Stack, other *Stack) {
107 if s.Size() == 0 && other.Size() == 0 {

Callers 2

EvalScriptFunction · 0.95
TestStackCountBoolFunction · 0.95

Calls

no outgoing calls

Tested by 1

TestStackCountBoolFunction · 0.76