Ad
  • Custom User Avatar

    I tried this problem some time ago but I could not succeed. I thought it was a skill issue. I'm back, definitely skill issue, but it doesn't take away from the fact that it's a horrendous problem.

  • Custom User Avatar

    0 is the 1st even number,
    2 is the 2nd even number,
    4 is the 3rd even number; and so on

  • Custom User Avatar

    OP solved it, closing

  • Custom User Avatar

    Approved

  • Custom User Avatar
    • Missing fixed test: empty string.
    • Since the kata is 8 kyu and aimed at total newbies, let's make their lives easier: please make the initial solution compilable, for example by returning some dummy value (like an empty string, or "Implement me" or anything).
    • > Basic test hello - make sure that when you present string values, they are quoted. It should be > Basic test "hello"
    • Again, for sake of newbies, make sure that the submission tests help them on failure. Make sure that fixed and fuxxed tests present inputs in some convenient way. Fuzzers do this out of the box, but for fixed tests you probably need to put inputs in test titles (there is no assertions with custom failure messages, are there?).
  • Custom User Avatar

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

  • Custom User Avatar

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

  • Custom User Avatar

    i'll fork this for cr7.
    SIUUUUU

  • Custom User Avatar
  • Custom User Avatar
  • Custom User Avatar

    Almost done. I cannot approach the random test.
    Sorry, I underestimated doing testing lol

  • Custom User Avatar

    Okay now I think I see the idea behind formatting of fixed tests, but I admit I am not a fan. If anything, I think I would like something with vertical tab stops more:

    [ test "3 *"   <| \_ -> repeatStr 3 "*"   |> Expect.equal "***",
      test "5 #"   <| \_ -> repeatStr 5 "#"   |> Expect.equal "#####",
      test "2 ha " <| \_ -> repeatStr 2 "ha " |> Expect.equal "ha ha " ]
    
  • Custom User Avatar

    Please see Elm translations form this collection, and see if any patterns presented there would be applicable to this translation. For example:

    • Reconsider formatting of fixed tests and example tests into something with at least consistent indentation.
    • Since there is quite a few fixed tests, see if they could be composed in a more data-driven fashion, like, for example a list of [{ str, repeats, expected, title }], and mapit into a list oftest`.
    • Since the kata is targeted at absolute beginners, consider adding example tests for some edge cases: 0 repeats of a non-empty string, non-zero repeats of an empty string, one repeat of a non-empty string, etc. Make sure that there are fixed tests in the full test suite which correspond to such edge cases.
  • Custom User Avatar

    Elm translation translation added :)

  • Custom User Avatar

    i cannot believe i solved this lol

  • Loading more items...