Skip to content

Instantly share code, notes, and snippets.

@havenwood
Last active December 14, 2019 06:31
Show Gist options
  • Save havenwood/cd9d137c9cb759e55ba1c0b775d02cc3 to your computer and use it in GitHub Desktop.
Save havenwood/cd9d137c9cb759e55ba1c0b775d02cc3 to your computer and use it in GitHub Desktop.
An example for IRC
chars = str
.split
.map(&:chars)
.reduce(&:zip)
.each_slice(2)
.map(&:join)
.map(&:chars)
chars.map { |char| char.map(&HASH) }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment