• Custom User Avatar

    Because the match arms have to be exhaustive. That is, it has to cover every possible case.
    So, gom68 included the s => s part, which pretty much says if the char (here called s, but can be called anything) isn't anything else listed above, just return that char. It's like the else after an if/else if.
    If it encountered an 'O', which doesn't fit anything else (it's not an 'A', nor a 'T', ...), it won't replace that 'O'. It'll just keep that O as it is.

    IMO, it should panic! instead, as any nucleotide not A, T, C or G is invalid.

  • Custom User Avatar

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

  • Custom User Avatar

    I thought I noticed the behavior of point 2. Nice to have it confirmed.