Ad
  • Default User Avatar

    I'm also getting this error but i DO have RankNTypes enabled..

  • Custom User Avatar

    I see. RankNTypes should be made available for TupleSections to work. The above error will occur when {-# LANGUAGE RankNTypes #-} is missing. Sorry for the stupid question.

  • Custom User Avatar

    How to avoid the following error on the test case Cannot use Control.Lens? I did not import anything that relates to Control.Lens.

    uncaught exception: IOException of type UserError
    user error (Could not parse solution correctly)
    
  • Default User Avatar

    A bijection is an isomorphism in the category of sets, meaning that it is just an invertible one-to-one mapping between two sets.Many categories can be thought of as sets with additional structure (e.g. groups, rings, differentiable functions etc.) and an isomorphism requires the structure of the category to be preserved. For example if you are mapping in the category of groups, then you need to map the identity element of the first group to the identity of the second group and you need to preserve the group law so that f(a*b) = f(a).f(b) where * is the group operation of the first group and . is the operation in the second group.

    The fact that there is a hint in the instructions to look at the wikipedia page for a bijection rather than the category theory definition of an isomorphism is actually a fairly subtle clue how to solve one of the parts of the kata which can only be solved by possibly breaking the isomorphism structure.

  • Default User Avatar

    I don't think the current syntax supports passing functions as arguments and calling them inside a function. 🤔

  • Custom User Avatar

    Which one is required now? 4 (2+avg 10 30) = 13.0 or (avg 4 2) + (avg 10 30) = 23.0? Thanks really.

  • Custom User Avatar

    After skimming the other discourses I found that this problem would very possibly not be tested ;)

  • Custom User Avatar

    Suppose

    fn apply f x => f x
    fn incr x => x + 1
    

    Since function calls are right associative, then how can we parse apply incr 1 into apply incr 1 but not apply (incr 1)?

  • Custom User Avatar

    Do not modify the nested list in your implementation or you won't pass the test ;)

  • Custom User Avatar

    @WinterShiver What do you mean by that? Not sure I understand the statement.

  • Default User Avatar

    Working on Scala
    When I am sending a code like def interpret(input: String): Option[String] =None or like smth in answer ut's working perfectly well and do compilation, but when I send my code with some realised functions, that works well on my computer - it sends an error message:
    Test Suite Aborted
    Exception encountered when invoking run on a nested suite - Unable to load a Suite class that was discovered in the runpath: SampleAssemblerInterpreterSuite

    What is it?

  • Custom User Avatar

    This kata may be more interesting if parameter passing is required. 2333

  • Custom User Avatar

    The standard of register names is not clarified in detail.
    In Assembler interpreter (part I), they are described as re alphabetical (letters only). But actually in this kata, to pass the tests, you should allow register names to begin with _/letters and follow by _/letters/numbers, like most common identifiers.

  • Custom User Avatar

    Maybe Data.Map with zipped list?

  • Custom User Avatar

    Data.HashMap is not supported by the Haskell compiler. Could I use something instead?

  • Loading more items...