Skip to content

Commit e5b6a7d

Browse files
committed
Rest of translations for Scala Tour
1 parent 1bb099f commit e5b6a7d

File tree

125 files changed

+317
-2228
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

125 files changed

+317
-2228
lines changed

_config.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,15 @@ collections:
4242
ba: # Bosnian translations
4343
output: true
4444
permalink: /:collection/:path.html
45+
pl: # Polish translations
46+
output: true
47+
permalink: /:collection/:path.html
48+
pt-br: # Brazilian Portuguese translations
49+
output: true
50+
permalink: /:collection/:path.html
51+
ko: # Korean translations
52+
output: true
53+
permalink: /:collection/:path.html
4554

4655

4756
defaults:
Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
2-
layout: inner-page-no-masthead
2+
layout: tour
33
title: 추상 타입
44

55
discourse: false
66

7-
tutorial: scala-tour
8-
categories: tour
7+
partof: scala-tour
8+
99
num: 22
10-
outof: 35
10+
1111
language: ko
1212

1313
next-page: compound-types
@@ -17,28 +17,28 @@ previous-page: inner-classes
1717
스칼라에선 값(생성자 파라미터)과 타입(클래스가 [제네릭](generic-classes.html)일 경우)으로 클래스가 매개변수화된다. 규칙성을 지키기 위해, 값이 객체 멤버가 될 수 있을 뿐만 아니라 값의 타입 역시 객체의 멤버가 된다. 또한 이런 두 형태의 멤버 모두 다 구체화되거나 추상화될 수 있다.
1818

1919
이 예제에선 [클래스](traits.html) `Buffer`의 멤버로써 완전히 확정되지 않은 값과 추상 타입을 정의하고 있다.
20-
20+
2121
trait Buffer {
2222
type T
2323
val element: T
2424
}
25-
25+
2626
*추상 타입*은 본성이 완전히 식별되지 않은 타입이다. 위의 예제에선 클래스 `Buffer`의 각 객체가 T라는 타입 멤버를 갖고 있다는 점만 알 수 있으며, 클래스 `Buffer`의 정의는 멤버 타입 `T`에 해당하는 특정 타입이 무엇이지 밝히고 있지 않다. 값 정의와 같이 타입 정의도 서브클래스에서 재정의(override) 할 수 있다. 이것은 타입 경계(추상 타입에 해당하는 예시를 나타내는)를 좀더 엄격하게 함으로써 추상 타입에 대해 좀더 많은 정보를 얻을수 있게 해준다.
2727

2828
다음 프로그램에선 `T` 타입이 새로운 추상 타입 `U`로 표현된 `Seq[U]`의 서브타입이어야 함을 나타내서, 버퍼에 시퀀스 만을 저장하는 클래스 `SeqBuffer`를 만들었다.
29-
29+
3030
abstract class SeqBuffer extends Buffer {
3131
type U
3232
type T <: Seq[U]
3333
def length = element.length
3434
}
35-
36-
추상 타입 멤버를 포함한 트레잇이나 [클래스](classes.html)는 종종 익명 클래스 인스턴스화와 함께 사용된다. 이를 알아보기 위해 정수의 리스트를 참조하는 시퀀스 버퍼를 다루는 프로그램을 살펴보자.
37-
35+
36+
추상 타입 멤버를 포함한 트레잇이나 [클래스](classes.html)는 종종 익명 클래스 인스턴스화와 함께 사용된다. 이를 알아보기 위해 정수의 리스트를 참조하는 시퀀스 버퍼를 다루는 프로그램을 살펴보자.
37+
3838
abstract class IntSeqBuffer extends SeqBuffer {
3939
type U = Int
4040
}
41-
41+
4242
object AbstractTypeTest1 extends App {
4343
def newIntSeqBuf(elem1: Int, elem2: Int): IntSeqBuffer =
4444
new IntSeqBuffer {
@@ -49,11 +49,11 @@ previous-page: inner-classes
4949
println("length = " + buf.length)
5050
println("content = " + buf.element)
5151
}
52-
52+
5353
메소드 `newIntSeqBuf`의 반환 타입은 트레잇 `Buffer`의 특수화를 따르며, 타입 `U``Int`와 같아진다. 메소드 `newIntSeqBuf` 내부의 익명 클래스 인스턴스화에서도 비슷한 타입 별칭이 있다. 여기선 `T` 타입이 `List[Int]`를 가리키는 `IntSeqBuf`의 새로운 인스턴스를 생성한다.
5454

5555
추상 타입 멤버를 클래스의 타입 파라미터로 하거나 클래스의 타입 파라미터로 추상 타입 멤버로를사용할 수 있음에 주목하자. 다음은 타입 파라미터만을 사용한, 앞서 살펴본 코드의 새로운 버전이다.
56-
56+
5757
abstract class Buffer[+T] {
5858
val element: T
5959
}
@@ -69,7 +69,7 @@ previous-page: inner-classes
6969
println("length = " + buf.length)
7070
println("content = " + buf.element)
7171
}
72-
72+
7373
여기선 [가변성 어노테이션](variances.html)을 사용해야만 한다는 점에 유의하자. 이를 사용하지 않으면 메소드 `newIntSeqBuf`에서 반환되는 객체의 특정 시퀀스 구현 타입을 감출 수 없게 된다. 뿐만 아니라 추상 타입을 타입 파라미터로 대체할 수 없는 경우도 있다.
7474

7575
윤창석, 이한욱 옮김, 고광현 수정

ko/tutorials/tour/_posts/2017-02-13-annotations.md renamed to _ko/tour/annotations.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
---
2-
layout: inner-page-no-masthead
2+
layout: tour
33
title: 어노테이션
44

55
discourse: false
66

7-
tutorial: scala-tour
8-
categories: tour
7+
partof: scala-tour
8+
99
num: 31
1010
language: ko
1111

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
---
2-
layout: inner-page-no-masthead
2+
layout: tour
33
title: 익명 함수 구문
44

55
discourse: false
66

7-
tutorial: scala-tour
8-
categories: tour
7+
partof: scala-tour
8+
99
num: 6
1010
language: ko
1111

ko/tutorials/tour/_posts/2017-02-13-automatic-closures.md renamed to _ko/tour/automatic-closures.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
---
2-
layout: inner-page-no-masthead
2+
layout: tour
33
title: 타입 의존 클로저의 자동 구성
44

55
discourse: false
66

7-
tutorial: scala-tour
8-
categories: tour
7+
partof: scala-tour
8+
99
num: 30
1010
language: ko
1111

ko/tutorials/tour/_posts/2017-02-13-case-classes.md renamed to _ko/tour/case-classes.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
---
2-
layout: inner-page-no-masthead
2+
layout: tour
33
title: 케이스 클래스
44

55
discourse: false
66

7-
tutorial: scala-tour
8-
categories: tour
7+
partof: scala-tour
8+
99
num: 10
1010
language: ko
1111

ko/tutorials/tour/_posts/2017-02-13-classes.md renamed to _ko/tour/classes.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
---
2-
layout: inner-page-no-masthead
2+
layout: tour
33
title: 클래스
44

55
discourse: false
66

7-
tutorial: scala-tour
8-
categories: tour
7+
partof: scala-tour
8+
99
num: 3
1010
language: ko
1111

ko/tutorials/tour/_posts/2017-02-13-compound-types.md renamed to _ko/tour/compound-types.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
---
2-
layout: inner-page-no-masthead
2+
layout: tour
33
title: 합성 타입
44

55
discourse: false
66

7-
tutorial: scala-tour
8-
categories: tour
7+
partof: scala-tour
8+
99
num: 23
1010
language: ko
1111

ko/tutorials/tour/_posts/2017-02-13-currying.md renamed to _ko/tour/currying.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
---
2-
layout: inner-page-no-masthead
2+
layout: tour
33
title: 커링
44

55
discourse: false
66

7-
tutorial: scala-tour
8-
categories: tour
7+
partof: scala-tour
8+
99
num: 9
1010
language: ko
1111

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
---
2-
layout: inner-page-no-masthead
2+
layout: tour
33
title: 기본 파라미터 값
44

55
discourse: false
66

7-
tutorial: scala-tour
8-
categories: tour
7+
partof: scala-tour
8+
99
num: 32
1010
language: ko
1111

0 commit comments

Comments
 (0)