Created
November 30, 2022 20:12
-
-
Save Willianvdv/3bb9fbfbeb0d82e7870239b83229e982 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def Organizer(c)=c.select{_1=~/^(?!tom)\w{5}/} | |
# Modify the solution above. Emojis are free. | |
# Code below will check correctness. | |
example_collection = [ | |
'apples', | |
33, | |
nil, | |
'hat', | |
'tomatoes', | |
'toothbrush', | |
'laptop' | |
] | |
raise unless Organizer(example_collection) == %w[apples toothbrush laptop] | |
puts 'It works!' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment