6 kyu

Interpolation Phalanx

130tel
Description
Loading description...
Interpreters
Fundamentals
  • Please sign in or sign up to leave a comment.
  • FArekkusu Avatar

    It would be nice if the declaration of interp was changed to interp :: (Name -> Maybe String) -> Phalanx -> Maybe String as the current one suggests that it receives a function (Name -> Maybe String) and returns another function (Phalanx -> Maybe String).

  • JohanWiltink Avatar

    Needs random tests

  • JohanWiltink Avatar

    ( Haskell )

    needs upgrade to GHC 8.8.x

    That means splitting the instance Monoid into instance Semigroup and instance Monoid ( mappend does not seem to be futureproof, so just additionally defining instance Semigroup where (<>) = mappend is not an optimal solution ) and updating the description, the initial solution and the example solution.

    ( Crikey. That's a lot of work for a kata that doesn't even have random tests. )

  • DealPete Avatar

    I found the intructions somewhat cryptic compared to those in dagger and razor, but once I figured out what you wanted it wasn't too bad.

  • TreyE Avatar

    This comment has been hidden.

  • Aditu_V Avatar

    The only issues I've found are in the description: it should mention that you have to implement rep, and maybe be a little nicer on the description of interp. For such an easy kata, I would mention what the first parameter actually is (the dictionary lookup function)

  • michalseweryn Avatar

    Unclear instruction. You should be more specific about difference between Lookup and Literal

  • phaul Avatar

    First it wasn't clear to me what the point was in defining rep and l. Maybe some explanation that these are the "constructor functions" which can be used to build up Phalanx could be useful. Then interp breaks down what we have built. I thought that the whole point was to implement interp and first I wondered why the rest was needed..

  • Bolo1729 Avatar

    Some things are not clear:

    1. Which is correct: interp e Empty == Nothing or interp e Empty == Just ""?

    2. Is it OK for rep to join an extra Empty at the end? For example:

      rep 2 (Literal "A") == Literal "A" Join Literal "A" Join Empty

  • etorreborre Avatar

    It would be nice to have the typeclass definitions in the code.

  • user1904234 Avatar
    • where missing at both instance declarations
    • function i should be l instead (according to a post below that should have been fixed, but it still appears this way)
  • Guf Avatar

    The function called "i" in the text and code should be named "l", since this is what the test expects.