Ad
  • 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
  • Custom User Avatar

    Looks like the last func (the one about a ^ 1 = a) isn't tested at all. Was able to leave it as error "..." and still pass the tests. Of course, one can't tests if it is done the proper 'hard way', but the general functionality is testable nontheless.

    We might also want to make it more apparent from the comments, that 'the hard way' stands for chain of operations on isomorphisms, just like the previous two examples. Judging by the existing solutions, half the folk just ignore the instructions completely. If not 'the hard way', the kata would be so much more boring and less insightful.

  • Custom User Avatar

    Note, that this pass2 fails on constant expressions more than 2 levels deep.

    (pass1 "[]1+2+3+4") `shouldPass2` (Imm 10)
    
    expected: Imm 10
            but got: Add (Imm 6) (Imm 4)