Question: Write a function, named isAnagram, that compares two lists and determines if the two lists are anagrams. >isAnagram tone enot True I) Using pattern matching

Write a function, named isAnagram, that compares two lists and determines if the two lists are anagrams. >isAnagram tone enot True I) Using pattern matching and guards. isAnagram:: [Char] -> [Char] -> Bool isAnagram [] [] = ___a___ isAnagram (x:xs) y | x == (last y) = ___b___ xs (init y) | otherwise = ___c___ II) Using lambdas and higher order functions. isAnagramHelper [] [] = [] isAnagramHelper (x:xs) y = (x,(last y)) : zipWithReverse xs (init y) isAnagram x y = ___d___ (\acc (a,b) -> acc && (a==b)) True (___e___ x y)

4.Choose the appropriate word to fill blank ___a___

True

False

isAnagram

xs

5.Choose the appropriate word to fill blank ___b___

True

False

foldl1

isAnagram

6.Choose the appropriate word to fill blank ___c___

True

False

isAnagram

xs

7.Choose the appropriate word to fill blank ___d___

foldl

map

isAnagramHelper

tail

8.Choose the appropriate word to fill blank ___e___

isAnagramHelper

foldl1

foldr1

scan

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!