함수형 프로그래밍으로 돌아가서 몇 가지 고급 주제에 대해 논의하자. 초보자는 이번 장을 건너
뛰어도 좋다. 하지만 나중에 대수적 데이터 타입
algebraic
data
type
, 카테고리 이론
category
theory
, 모
나드
monad
등의 말을 듣게 된다면 이 장을 다시 살펴봐야 한다.
이 장의 목적은 그런 개념이 어떤 것인지 감을 잡고, 그런 이론이나 표기법의 수렁에 너무 깊이
빠지는 일 없이 그 유용성에 대해 아는 것이다.
16.1
대수적 데이터 타입
‘
ADT
’라는 줄임말에는 두 가지 용법이 있다. 하나는 추상 데이터 타입
abstract
data
type
이고, 다른
하나는 대수적 데이터 타입
algebraic
data
type
이다. 이 둘을 서로 혼동하는 일이 많다. 전자는 객체지
향 프로그래밍 세계에서 흔히 사용한다. 우리에게 친숙한
Seq
는 바로 모든 종류의 순차적 컬렉
션에 대한 추상화다. 반대로, 대수적 데이터 타입은 함수형 프로그래밍 세계에서 온 것이다. 아
마 조금 낯설 수도 있지만, 그 중요성은 추상 데이터 타입 못지않다.
대수적 데이터 타입이라는 용어는 앞으로 논의할 이런 종류의 데이터 타입이 대수적인 특성,
즉 어떤 수학적 특성을 만족시켜야 하기 때문이다. 이런 수학적 특성은 우리가 만든 데이터 타
입에 대한 특성을 증명할 수 있게 ...
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.
O’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
I 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
I’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
I'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.