MCPcopy Index your code
hub / github.com/expr-lang/expr / random

Function random

test/gen/utils.go:33–35  ·  view source on GitHub ↗
(array []T)

Source from the content-addressed store, hash-verified

31}
32
33func random[T any](array []T) T {
34 return array[rand.Intn(len(array))]
35}

Callers 11

booleanNodeFunction · 0.85
identifierNodeFunction · 0.85
memberNodeFunction · 0.85
unaryNodeFunction · 0.85
binaryNodeFunction · 0.85
methodNodeFunction · 0.85
funcNodeFunction · 0.85
builtinNodeFunction · 0.85
predicateNodeFunction · 0.85
pointerNodeFunction · 0.85
variableNodeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…