Skip to Content
프로그래밍 스칼라: 실용적인 스칼라 활용법을 익히는 가장 확실한 실전 바이블 (2.11.x 버전 기반)
book

프로그래밍 스칼라: 실용적인 스칼라 활용법을 익히는 가장 확실한 실전 바이블 (2.11.x 버전 기반)

by 오현석, 딘 왐플러, 알렉스 페인
July 2016
Beginner to intermediate
776 pages
17h 26m
Korean
Hanbit Media, Inc.
Content preview from 프로그래밍 스칼라: 실용적인 스칼라 활용법을 익히는 가장 확실한 실전 바이블 (2.11.x 버전 기반)
644
4
고급 주제 및 실전 응용
18.4
수학을 위한 카테고리
16
장에서 카테고리에 대해 설명했다. 빅데이터에서 유명한 카테고리로 우리가 설명하지 않은
것으로 모노이드
Monoid
가 있다.
16
장을 건너뛴 독자는 카테고리를 수학에 기반한 디자인 패턴
로 생각하면 된다.
모노이드덧셈에 대한 추상화다. 모노이드에는 다음과 같은 특성이 있다.
1
. 결합 법칙이 성립하는 이항 연산자 하나
2
. 항등원
덧셈 연산은 이런 특성을 만족한다. 결합 법칙을 만족해서 예를 들면 (
1
.
1
+
2
.
2
)
+
3
.
3
==
1
.
1
+
(
2
.
2
+
3
.
3
)이며,
0
이 항등원이다. 곱셈도 마찬가지다.
1
이 항등원이다. 수의 덧셈과 곱셈에
1
.
1
+
2
.
2
==
2
.
2
+
1
.
1
과 같이 교환 법칙도 성립하지만, 모노이드에는 필요 없다.
이것이 중요한 이유가 뭘까? 대부분의 데이터 구조가 이런 특성을 만족한다는 것이 드러났다.
따라서 어떤 코드가 모노이드에 대해 작동하도록 코드를 일반화할 수 있다면, 재사용성이 굉장
히 좋아질 것이다 (위키피디아의 해당 항목을 보라 (
http
://
bit
.
ly
/
1tphZ15
)).
모노이드의 예로는 스트링 연결, 행렬 덧셈과 곱셈, 최솟값과 최댓값 계산, 유일한 값을 찾
기 위한 하이퍼로그로그
HyperLogLog
, 집합의 유사성을 위한 민
-
해시
Min
-
hash
, 집합 원소 검사를
위한 블룸 필터
Bloom
filter
등이 있다 (애비 브라이언트
Avi
Bryant
의 훌륭한 발표 “
Add
ALL
The
Things
!”(
http
://
bit ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

스파크를 이용한 자연어 처리 : 대규모 텍스트를 다루는 가장 효율적인 딥러닝을 만나다

스파크를 이용한 자연어 처리 : 대규모 텍스트를 다루는 가장 효율적인 딥러닝을 만나다

이창현, 앨릭스 토머스

Publisher Resources

ISBN: 9788968482755