Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Conundrum, sample of UTF-8 in Ruby 1.9.2
# encoding: utf-8
# conundrum.rb
alias :lambda
alias :abort
module Enumerable
alias :⇔ :collect
alias : :reject
alias :∈ :select
alias : :inject
alias : :all?
alias :∃ :any?
end
class Array
alias :each
alias :⊠ :each_index
alias :≡ :eql?
alias :∋ :include?
alias : :|
alias : :&
end
%w(a b c).× do |letter| puts letter; end
%w(a b c). %w(x y z) do |letter| puts letter; end
%w(a b c). %w(c y z) do |letter| puts letter; end
a = λ {|s| puts s}
a.call('test')
Ω "It is the end"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.