PasteRack.org
Paste #
5563
2013-10-08 00:54:17
Fork
as a new paste.
Paste viewed 54466 times.
Tweet
Embed:
<link type="text/css" rel="stylesheet" href="http://pasterack.org/scribble.css"/><link type="text/css" rel="stylesheet" href="http://pasterack.org/racket.css"/><link type="text/css" rel="stylesheet" href="http://fonts.googleapis.com/css?family=Droid+Sans+Mono"/><div style="font-family:'Droid Sans Mono',monospace;background-color:transparent"><ol start="0" style="font-size:70%;color:#A0A0A0"><li><span style="font-family:'Droid Sans Mono',monospace;font-size:125%"><span class="RktMeta">#lang</span><span class="hspace"> </span><span class="RktMeta"></span><a class="RktModLink" data-pltdoc="x" href="http://docs.racket-lang.org/reference/index.html"><span class="RktSym">racket</span></a><span class="RktMeta"></span></span></li><li><span style="font-family:'Droid Sans Mono',monospace;font-size:125%"><span class="RktMeta"></span><span class="RktCmt">;;</span><span class="hspace"> </span><span class="RktCmt">Print</span><span class="hspace"> </span><span class="RktCmt">the</span><span class="hspace"> </span><span class="RktCmt">Greek</span><span class="hspace"> </span><span class="RktCmt">alphabet</span><span class="RktMeta"></span></span></li><li><span style="font-family:'Droid Sans Mono',monospace;font-size:125%"><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><a class="RktStxLink" data-pltdoc="x" href="http://docs.racket-lang.org/reference/for.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._for%29%29">for</a></span><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktPn">[</span><span class="RktSym">i</span><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><a class="RktValLink" data-pltdoc="x" href="http://docs.racket-lang.org/reference/sequences.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._in-range%29%29">in-range</a></span><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktVal">25</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span><span class="RktMeta"></span></span></li><li><span style="font-family:'Droid Sans Mono',monospace;font-size:125%"><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><a class="RktValLink" data-pltdoc="x" href="http://docs.racket-lang.org/reference/Writing.html#%28def._%28%28lib._racket%2Fprivate%2Fmisc..rkt%29._displayln%29%29">displayln</a></span><span class="RktMeta"></span></span></li><li><span style="font-family:'Droid Sans Mono',monospace;font-size:125%"><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><a class="RktValLink" data-pltdoc="x" href="http://docs.racket-lang.org/reference/characters.html#%28def._%28%28quote._~23~25kernel%29._integer-~3echar%29%29">integer->char</a></span><span class="RktMeta"></span></span></li><li><span style="font-family:'Droid Sans Mono',monospace;font-size:125%"><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><a class="RktValLink" data-pltdoc="x" href="http://docs.racket-lang.org/reference/generic-numbers.html#%28def._%28%28quote._~23~25kernel%29._%2B%29%29">+</a></span><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktSym">i</span><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><a class="RktValLink" data-pltdoc="x" href="http://docs.racket-lang.org/reference/characters.html#%28def._%28%28quote._~23~25kernel%29._char-~3einteger%29%29">char->integer</a></span><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktVal">#\u3B1</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktMeta"></span></span></li></ol><p>=></p><blockquote><table style="font-size:90%;table-layout:fixed;width:100%;word-wrap:break-word"><tr><td><table style="font-size:95%;table-layout:fixed;width:100%;word-wrap:break-word"><tr><td><p><span class="RktOut">α</span></p></td></tr><tr><td><p><span class="RktOut">β</span></p></td></tr><tr><td><p><span class="RktOut">γ</span></p></td></tr><tr><td><p><span class="RktOut">δ</span></p></td></tr><tr><td><p><span class="RktOut">ε</span></p></td></tr><tr><td><p><span class="RktOut">ζ</span></p></td></tr><tr><td><p><span class="RktOut">η</span></p></td></tr><tr><td><p><span class="RktOut">θ</span></p></td></tr><tr><td><p><span class="RktOut">ι</span></p></td></tr><tr><td><p><span class="RktOut">κ</span></p></td></tr><tr><td><p><span class="RktOut">λ</span></p></td></tr><tr><td><p><span class="RktOut">μ</span></p></td></tr><tr><td><p><span class="RktOut">ν</span></p></td></tr><tr><td><p><span class="RktOut">ξ</span></p></td></tr><tr><td><p><span class="RktOut">ο</span></p></td></tr><tr><td><p><span class="RktOut">π</span></p></td></tr><tr><td><p><span class="RktOut">ρ</span></p></td></tr><tr><td><p><span class="RktOut">ς</span></p></td></tr><tr><td><p><span class="RktOut">σ</span></p></td></tr><tr><td><p><span class="RktOut">τ</span></p></td></tr><tr><td><p><span class="RktOut">υ</span></p></td></tr><tr><td><p><span class="RktOut">φ</span></p></td></tr><tr><td><p><span class="RktOut">χ</span></p></td></tr><tr><td><p><span class="RktOut">ψ</span></p></td></tr><tr><td><p><span class="RktOut">ω</span></p></td></tr></table></td></tr></table></blockquote></div>
Greek alphabet
#lang
racket
;;
Print
the
Greek
alphabet
(
for
(
[
i
(
in-range
25
)
]
)
(
displayln
(
integer->char
(
+
i
(
char->integer
#\u3B1
)
)
)
)
)
=>
α
β
γ
δ
ε
ζ
η
θ
ι
κ
λ
μ
ν
ξ
ο
π
ρ
ς
σ
τ
υ
φ
χ
ψ
ω