Skip to content

Instantly share code, notes, and snippets.

@juanca
Created April 30, 2019 21:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save juanca/efc49bbc85e7b61817440b02421ba0a9 to your computer and use it in GitHub Desktop.
Save juanca/efc49bbc85e7b61817440b02421ba0a9 to your computer and use it in GitHub Desktop.
pair+juan-carlos
require 'set'
Set.new("pair".chars) + Set.new("juan".chars) - Set.new("carlos".chars)
# => #<Set: {"p", "i", "j", "u", "n"}>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment