Unicode

Ruby code posted by murphy
created at 07 Jun 18:29, updated at 25 Jun 15:51

Edit | Back
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
ä = 42
print ä

def straße(frühstück)
  höhle(frühstück)
end

alias λ lambda
× = λ { |x,y| x*y }
×[2,3]  # => 6s dfsdf

# Summe der ersten 10 Quadratzahlen
def ∑ enum
  enum.inject(0) { |sum, x| sum + yield(x) }
end

∑(1..10) { |x| x**2 }  # => 385

# mehr mathematische Zeichen
def ∞; 1.0 / 0.0; end
def π; Math::PI; end

-∞ .. 2*π  # => -Infinity..6.28318530717959

# Azumanga Daioh Insider
class << Osaka = Object.new
  def ぁ!
    sleep ∞
  end
end
506 Bytes in 4 ms with coderay