Ad
  • Custom User Avatar

    Wow learned a lot from this example.
    First of I've never seen to_proc (&) used on a hash before like that. Thats sweet

    I'm not entirely sure why each number is wrapped into singletons on the rhs of the hash though. Wouldn't a list of numbers work just the same?

  • Custom User Avatar

    This does not preseve whitespace.
    " this is wrong" should arguably still include a leading space (as said by babakgh)
    "this [space space space] is wrong" should arguably still have multiple spaces between 'this' and 'is'
    EDIT: Aparently codewars also doesnt preserve multiple whitespace even in code blocks, but hopefully its clear what I mean