|
I confused by the anamerge function. Its supposed to merge words with the same anagram-canonical form. That would make me think it would simply concatentate the tails of two anapairs that have the same first element (the canonical form). However, the partial definition we are given has anamerge taking (p1::r) what is p1 and what is r? Is this a list of pairs? or a list of words? or what? Furthermore, when and how do we check if the things we're merging have the same anagram-canonical form or not? Sorry this question is so late. Help please? Thanks
Mamun P.S. Also thoroughly confused by mergehead (c1, w1) ((c2 :: l2) :: rr) = ... what's the ((c2::l2) :: rr)??
|
Re: anamerge by Jesse Dailey, 2001, Nov 28
But.... by Mamun Tanveer, 2001, Nov 28
Be careful about lists vs. pairs vs. list elements by Mike O'Donnell, 2001, Nov 28
:: is infix cons by Mike O'Donnell, 2001, Nov 28
Problems still by Mamun Tanveer, 2001, Nov 28
wrong order by Jesse Dailey, 2001, Nov 28
Yes: list recursion is usually right-associative by Mike O'Donnell, 2001, Nov 28
the other place? by Mamun Tanveer, 2001, Nov 28
Do anamerge first: it's recursion is right-associative by Mike O'Donnell, 2001, Nov 28
How to get to the end of the list by Mamun Tanveer, 2001, Nov 28
to: