Skip to Content
For Enterprise
For Government
For Higher Ed
For Individuals
For Marketing
For Enterprise
For Government
For Higher Ed
For Individuals
For Marketing
Explore Skills
Cloud Computing
Microsoft Azure
Amazon Web Services (AWS)
Google Cloud
Cloud Migration
Cloud Deployment
Cloud Platforms
Data Engineering
Data Warehouse
SQL
Apache Spark
Microsoft SQL Server
MySQL
Kafka
Data Lake
Streaming & Messaging
NoSQL Databases
Relational Databases
Data Science
Pandas
R
MATLAB
SAS
D3
Power BI
Tableau
Statistics
Exploratory Data Analysis
Data Visualization
AI & ML
Generative AI
Machine Learning
Artificial Intelligence (AI)
Deep Learning
Reinforcement Learning
Natural Language Processing
TensorFlow
Scikit-Learn
Hyperparameter Tuning
MLOps
Programming Languages
Java
JavaScript
Spring
Python
Go
C#
C++
C
Swift
Rust
Functional Programming
Software Architecture
Object-Oriented
Distributed Systems
Domain-Driven Design
Architectural Patterns
IT/Ops
Kubernetes
Docker
GitHub
Terraform
Continuous Delivery
Continuous Integration
Database Administration
Computer Networking
Operating Systems
IT Certifications
Security
Network Security
Application Security
Incident Response
Zero Trust Model
Disaster Recovery
Penetration Testing / Ethical Hacking
Governance
Malware
Security Architecture
Security Engineering
Security Certifications
Design
Web Design
Graphic Design
Interaction Design
Film & Video
User Experience (UX)
Design Process
Design Tools
Business
Agile
Project Management
Product Management
Marketing
Human Resources
Finance
Team Management
Business Strategy
Digital Transformation
Organizational Leadership
Soft Skills
Professional Communication
Emotional Intelligence
Presentation Skills
Innovation
Critical Thinking
Public Speaking
Collaboration
Personal Productivity
Confidence / Motivation
Features
All features
Verifiable skills
AI Academy
Courses
Certifications
Interactive learning
Live events
Superstreams
Answers
Insights reporting
Radar Blog
Buy Courses
Plans
Sign In
Try Now
O'Reilly Platform
book
함수형 프로그래밍 with 자바
by
벤 바이디히
,
허귀영
March 2024
Beginner to intermediate
528 pages
10h 48m
Korean
Hanbit Media, Inc.
Content preview from
함수형 프로그래밍 with 자바
231
CHAPTER 06
스트림을 이용한 데이터 처리
스트림 작업 시 지역적인 사이드 이펙트
side
effect
가 꼭 나쁜 것만은 아닙니다. 모든 코드를 간
단하게 리팩터링하여 사이드 이펙트를 없애는 것은 사실상 불가능에 가깝습니다. 다른 연산
들과 마찬가지로, 스트림 내부의 로직의 간결성은 해당 스트림 파이프라인이 얼마나 명확하
고 이해하기 쉬운지에 달려있습니다. 메서드 참조나 간결한 람다보다 복잡한 로직이 필요하
다면 파이프라인의 간결성과 가독성을 유지하기 위해 해당 로직을 별도의 메서드로 분리하
는 것이 좋습니다.
6.3.4
연산 비용
스트림의 아름다움은 여러 연산을 단일 파이프라인으로 연결할 수 있는 능력에 있습니다. 그
러나 한 가지 기억해야 할 것이 있습니다. 항목이 다운스트림에서 거부될 때까지 모든 연산
이 호출됩니다.
[예제
6
-
15
]에서 간단한 스트림 파이프라인을 살펴보겠습니다.
예제
6-15
단순한 과일 파이프라인
Stream
.
of
("
ananas
",
"
oranges
",
"
apple
",
"
pear
",
"
banana
")
.
map
(
String
::
toUpperCase
)
❶
.
sorted
()
❷
.
filter
(
s
->
s
.
startsWith
("
A
"))
❸
.
forEach
(
System
.
out
::
println
);
❹
❶
원하는 형태로 요소 변환하기
❷
자연스러운 ...
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.
Start your free trial
You might also like
실무로 통하는 클린 코드
막시밀리아노 콘티에리
함수형 사고: 객체지향 개발자에서 함수형 개발자로 거듭나기
김재완, 닐 포드
러닝 Go : Go 개발자처럼 생각하는 방법
존 보드너
AI를 위한 필수 수학
할라 넬슨
Publisher Resources
ISBN: 9791169212175