Ad
  • Custom User Avatar

    kata hint != kata suggestion

  • Custom User Avatar

    Seems to be fixed.

  • Custom User Avatar
  • Custom User Avatar

    Nope, issue with your code very likely ~~

  • Custom User Avatar

    Or you could make the argument that this way the type is simpler, so easier to comprehend for the target demographic ( which might yet have to learn about native polymorphic always ).

  • Default User Avatar

    I suppose you didn't see the:

    Notes:

    • The first function would have been better named: findKprimes or kPrimes

    and the signature:-) Sorry for the ill-chosen name!

  • Default User Avatar

    Sorry but I don't understand your issue: the signature is countKprimes :: Int -> Int -> Int -> [Int].

  • Custom User Avatar

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

  • Custom User Avatar

    Thanks for your feedback :D While I do agree that this Kata could've been ranked at 3 kyu instead (the average rank assessment for this Kata while in Beta), the other Kata you mentioned was approved early when Idris was just added to Codewars (and Agda/Coq weren't even available then) so it was naturally overranked given that there weren't many similar Kata to compare against and the existing Haskell "theorem-proving" Kata used for reference were severely overranked since Haskellers don't typically do theorem-proving.

  • Custom User Avatar

    This is the power of type driven programming.
    refl is always a = a, b = b, c = c, etc. it is the isoPow/isoS/isoEither/isoTrans that get them into the right place.

  • Custom User Avatar
  • Custom User Avatar

    'kay, as you want. ;)

  • Custom User Avatar

    you removed the other message, so I'll answer here instead ;)

    [ ... ] (you found by yourself that it was actually valid ;) )

    I forgot to warn you about that in the thread below: for some time there had been some differences across languages (was valid in some, invalid in others). After I went through all versions, we changed the bnf to have a valid NameOrNumber for Expression. So it's good.

    Note: iirc you do C-like languages, right? We'd need a PU to add the random tests to those (based on java/ruby/python/JS versions). Could you take care of that after solving the kata?


    edit:

    also this makes 1() work. I see

    yep ;)

  • Custom User Avatar
  • Custom User Avatar

    na wait... you didn't undrstand what I meant. I "concatenated" two parts to show you the result:

    function ::= expression "(" [parameters] ")" [lambda]    << (1)
               | expression lambda
    
    expression ::= nameOrNumber
                 | lambda          << (2)
    

    leads you to:

    function ::= lambda "(" [parameters] ")" [lambda]
    

    so yes, that's perfectly valid.

  • Loading more items...