Question: This is a go function. ----->>> type symbol rune type state uint type TransitionFunction func(st state, sym symbol) []state What does this return? And How
This is a go function. ----->>>
type symbol rune
type state uint
type TransitionFunction func(st state, sym symbol) []state

What does this return?
And How can we get element from TransitionFunction?
func Reachable(transitions TransitionFunction, start, final state, input []symbol) bool {
//how to get value from transitions??
fmt.Println("start: ", start)
fmt.Println("final: ", final)
fmt.Println("symbol: ", string(input[0]))
return false
}
func blahTransitions (st state, sym symbol) []state ok x0 -a- *0 -a-> 1 * 1 -b-> 1 ok return map[state]map[symbol][]state( 0: map[symbol][ ]statef a: []statefe, 1), 3, 1: map[symbol][]statef b: [state1), 3, Hst][sym] func blahTransitions (st state, sym symbol) []state ok x0 -a- *0 -a-> 1 * 1 -b-> 1 ok return map[state]map[symbol][]state( 0: map[symbol][ ]statef a: []statefe, 1), 3, 1: map[symbol][]statef b: [state1), 3, Hst][sym]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
