Question: Given are the following function definitions: f:: [Int]-->[Int] f[ ] = [ ] f(x : xs)=(g z):(f xs ) g :: Int --> Int g
![Given are the following function definitions: f:: [Int]-->[Int] f[ ] =](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f58fdc6b37c_17966f58fdbd8d76.jpg)
Given are the following function definitions: f:: [Int]-->[Int] f[ ] = [ ] f(x : xs)=(g z):(f xs) g :: Int --> Int g 3 = g 4 g n= n+1 as well as the predefined functions head and tail. Write down the individual evaluation steps for the following expression (until the final result and while precisely respecting Haskell's evaluation strategy): head (tail(tail((g 2):(f[3,3+1])))) =head(tail(f[3,3+1])) =____________________ =____________________ =____________________
. aluation, highereonder, (12p). f=[lnt)(lnt)f[1=1)f(x:x)=(5,2):(f+0)g+lntlnt93=gdn=n+1 as well as the prolefiavd fomstloins head und tail. Write doma the individual craluation steps for the following exptmesion (until the final sesit. and while pecivele resereting Haskell's eraluathoe ntratery!): heed ( (tait (teit (sg3):([/3,3+1])))) = Aosd (toil (f/2,3+1in,3)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
