Let L be an SList. Define a recursive function Wham as follows. B. Suppose L = x. Then Wham(L) = x · x. R. Suppose L = (X, Y). Then Wham(L) = Wham(X)

generals336

generals336

Answered question

2021-06-06

Let L be an SList. Define a recursive function Wham as follows. B. Suppose L = x. Then Wham(L)=x˙x.R. Suppose L = (X, Y). Then Wham(L)=Wham(X)+Wham(Y). Evaluate Wham (2, 4), (7, 9) , showing all work.

Answer & Explanation

oppturf

oppturf

Skilled2021-06-07Added 94 answers

Given:
Wham(x)=x×x
Wham(X,Y)=Wham(X)+Wham(Y)
We need to evaluate Wham((2,4),(7,9)).

Wham(X,Y)=Wham(X)+Wham(Y)
Wham((2,4),(7,9))=Wham(2,4)+Wham(7,9)
Wham(X,Y)=Wham(X)+Wham(Y)=Wham(2)+Wham(4)+Wham(7)+Wham(9)
Wham(z)=x×x=22+44+77+99=4+16+49+81=150

Do you have a similar question?

Recalculate according to your conditions!

Ask your question.
Get an expert answer.

Let our experts help you. Answer in as fast as 15 minutes.

Didn't find what you were looking for?