README
Korean - ํ๊ตญ์ด Raku Module
A Raku module that provides Korean language bindings for programming in Raku.
Installation
zef install KoreanUsage
use Korean;
# or
use ํ๊ตญ์ด;
# or
use ํ๊ธ;
# Constants
say ์ฐธ; # True
say ๊ฑฐ์ง; # False
say ๋ฌด(); # Nil
say ์์ฃผ์จ; # ฯ (pi)
# Math operations
say ๋ํ๊ธฐ(2, 3); # 5 (add)
say ๋นผ๊ธฐ(10, 3); # 7 (subtract)
say ๊ณฑํ๊ธฐ(4, 5); # 20 (multiply)
say ๋๋๊ธฐ(20, 4); # 5 (divide)
say ์ ๊ณฑ(2, 3); # 8 (power)
# String operations
say ๊ธธ์ด("์๋
ํ์ธ์"); # 5 (length)
say ๋๋ฌธ์("hello"); # HELLO (uppercase)
say ๊ฑฐ๊พธ๋ก("๊ฐ๋๋ค๋ผ"); # ๋ผ๋ค๋๊ฐ (reverse)
# Array operations
my @๋ฐฐ์ด = <์ฌ๊ณผ ๊ทค ํฌ๋>;
say ์ฒซ๋ฒ์งธ(@๋ฐฐ์ด); # ์ฌ๊ณผ (first)
say ๋ง์ง๋ง(@๋ฐฐ์ด); # ํฌ๋ (last)
say ํฉ๊ณ([1, 2, 3, 4]); # 10 (sum)
# Type checking
say ์ซ์์ธ๊ฐ(42); # True (is-number)
say ๋ฌธ์์ด์ธ๊ฐ("text"); # True (is-string)
say ๋ฆฌ์คํธ์ธ๊ฐ(@๋ฐฐ์ด); # True (is-list)
# Control flow
๋ง์ฝ ์ฐธ {
๋งํ๊ธฐ("์ด๊ฒ์ ์ฐธ์
๋๋ค"); # This is true
}
๊ฐ๊ฐ @๋ฐฐ์ด -> $๊ณผ์ผ {
์ถ๋ ฅ("$๊ณผ์ผ "); # Print each fruit
}
# Operators
say 5 ๋ํ๊ธฐ 3; # 8
say 10 ๋นผ๊ธฐ 3; # 7
say 4 ๊ณฑํ๊ธฐ 5; # 20
say 20 ๋๋๊ธฐ 4; # 5
say 5 ํฌ๋ค 3; # True
say 2 ์๋ค 5; # True
say 42 ๊ฐ๋ค 42; # TrueFeatures
Constants and Nil
์ฐธ(cham) - True๊ฑฐ์ง(geojit) - False๋ฌด()(mu) - Nil (as function)๋()(neol) - Nil (alternative)๋น(bin) - Empty string๋ฌดํ๋(muhande) - Infinity์์ฃผ์จ(wonjuyul) - Pi (ฯ)์์ฐ์์(jayeonsangsu) - Euler's number (e)
Math Functions
๋ํ๊ธฐ(deohagi) - add๋นผ๊ธฐ(ppaegi) - subtract๊ณฑํ๊ธฐ(gobhagi) - multiply๋๋๊ธฐ(nanugi) - divide๋๋จธ์ง(nameoji) - modulo์ ๊ณฑ(jegob) - power์ ๋๊ฐ(jeoldaetgabs) - absolute value๋ฐ์ฌ๋ฆผ(ban-ollim) - round๋ด๋ฆผ(naelim) - floor์ฌ๋ฆผ(ollim) - ceiling
String Functions
๊ธธ์ด(gil-i) - length๋๋ฌธ์(daemunja) - uppercase์๋ฌธ์(somunja) - lowercase๊ฑฐ๊พธ๋ก(geokkulo) - reverseํฌํจ(poham) - contains์์(sijag) - starts-with๋(kkeut) - ends-with
Array Functions
๊ฐ์(gaesu) - count elements์ฒซ๋ฒ์งธ(cheosbeonjjae) - first element๋ง์ง๋ง(majimag) - last elementํฉ๊ณ(habgye) - sum์ต๋(choedae) - maximum์ต์(choeso) - minimumํ๊ท(pyeong-gyun) - average๋งต(maeb) - mapํํฐ(pilteo) - filter
Type Checking
์ซ์์ธ๊ฐ(susjain-ga) - is-number์ ์์ธ๊ฐ(jeongsu-in-ga) - is-integer๋ฌธ์์ด์ธ๊ฐ(munjalyeol-in-ga) - is-string๋ฆฌ์คํธ์ธ๊ฐ(liseuteu-in-ga) - is-list
I/O Functions
๋งํ๊ธฐ(malhagi) - say์ถ๋ ฅ(chullyeog) - print์ ๋ ฅ(iblyeog) - input prompt
Operators
๋ํ๊ธฐ(deohagi) - infix addition๋นผ๊ธฐ(ppaegi) - infix subtraction๊ณฑํ๊ธฐ(gobhagi) - infix multiplication๋๋๊ธฐ(nanugi) - infix division๊ฐ๋ค(gatda) - equalsํฌ๋ค(keuda) - greater than์๋ค(jagda) - less than
License
Artistic-2.0
Author
Danslav Slavenskoj