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

This is a go function. ----->>> type symbol rune type state uint

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!