Korean - 한국어 Raku Module
A Raku module that provides Korean language bindings for programming in Raku.
Installation
zef install Korean
Usage
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; # True
Features
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