Ad
  • Custom User Avatar

    Thanks for the explanation. I was trying to work out a formula to simplify my solution but gave up.

  • Custom User Avatar

    L and M are not referring to categories. They are referring to your input variables. So if no books are given or no categories to return in a Haskell string format, then return and empty string.

  • Custom User Avatar

    Thank you for the reply!

    I remain a little confused..

    So, as you describe it, category W should be 0 because there are no codes associated with it right? However, you also say that if a category (L or M) is empty (in other words no codes are associated with it) then an empty string should be returned?

    I get it now! My mind heuristically associated uppercase L and M with categories A-Z, so I thought that by L or M being empty you were referring to the categories being empty rather than a or b (or list_of_art or list_of_cat being empty).

    Is my new understanding correct?

    You are more experienced than me so I'd hate to overreach. However, one suggestion that I may give is that instead of referring to the input variables as L or M in your description, you give them meaningful names such as 'booklist' (L) and 'report_categories' (M)?

    Thanks again! Great kata. Got my mind working!

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution