SlideShare une entreprise Scribd logo
1  sur  22
Télécharger pour lire hors ligne
⇢
⇢
⇢
⇢
⇢
⇢
⇢




















// `ExecutionContext` 

def getEmployee(id: Int)(implicit e: ExecutionContext): Future[Employee] = ???
def getRole(employee :Employee)(implicit e: ExecutionContext): Future[Role] = ???
// `ExecutionContext` 

def getEmployee(id: Int)(implicit e: ExecutionContext): Future[Employee] = ???
def getRole(employee :Employee)(implicit e: ExecutionContext): Future[Role] = ???
// `ExecutionContext` 

def getEmployee(id: Int)(implicit e: ExecutionContext): Future[Employee] = ???
def getRole(employee :Employee)(implicit e: ExecutionContext): Future[Role] = ???
val ec: ExecutionContext = scala.concurrent.ExecutionContext.Implicits.global
val bigEmployee: Future[EmployeeWithRole] =
getEmployee(100)(ec).flatMap { e =>
getRole(e)(ec).map { r =>
EmployeeWithRole(e.id, e.name,r)
}(ec)
}(ec)
// `ExecutionContext` 

def getEmployee(id: Int)(implicit e: ExecutionContext): Future[Employee] = ???
def getRole(employee :Employee)(implicit e: ExecutionContext): Future[Role] = ???
val ec: ExecutionContext = scala.concurrent.ExecutionContext.Implicits.global
val bigEmployee: Future[EmployeeWithRole] =
getEmployee(100)(ec).flatMap { e =>
getRole(e)(ec).map { r =>
EmployeeWithRole(e.id, e.name,r)
}(ec)
}(ec)
// `ExecutionContext` 

def getEmployee(id: Int)(implicit e: ExecutionContext): Future[Employee] = ???
def getRole(employee :Employee)(implicit e: ExecutionContext): Future[Role] = ???
val ec: ExecutionContext = scala.concurrent.ExecutionContext.Implicits.global
val bigEmployee: Future[EmployeeWithRole] =
getEmployee(100)(ec).flatMap { e =>
getRole(e)(ec).map { r =>
EmployeeWithRole(e.id, e.name,r)
}(ec)
}(ec)
🤔🤔🤔
// `ExecutionContext` 

def getEmployee(id: Int)(implicit e: ExecutionContext): Future[Employee] = ???
def getRole(employee :Employee)(implicit e: ExecutionContext): Future[Role] = ???
implicit val ec: ExecutionContext = scala.concurrent.ExecutionContext.Implicits.global
val bigEmployee: Future[EmployeeWithRole] =
getEmployee(100).flatMap { e =>
getRole(e).map { r =>
EmployeeWithRole(e.id, e.name,r)
}
}
// `ExecutionContext` 

def getEmployee(id: Int)(implicit e: ExecutionContext): Future[Employee] = ???
def getRole(employee :Employee)(implicit e: ExecutionContext): Future[Role] = ???
implicit val ec: ExecutionContext = scala.concurrent.ExecutionContext.Implicits.global
val bigEmployee: Future[EmployeeWithRole] =
getEmployee(100).flatMap { e =>
getRole(e).map { r =>
EmployeeWithRole(e.id, e.name,r)
}
}
// `ExecutionContext` 

def getEmployee(id: Int)(implicit e: ExecutionContext): Future[Employee] = ???
def getRole(employee :Employee)(implicit e: ExecutionContext): Future[Role] = ???
implicit val ec: ExecutionContext = scala.concurrent.ExecutionContext.Implicits.global
val bigEmployee: Future[EmployeeWithRole] =
getEmployee(100).flatMap { e =>
getRole(e).map { r =>
EmployeeWithRole(e.id, e.name,r)
}
}
😇😇😇
😇
怖くない!Implicit!

Contenu connexe

Tendances (20)

Modificacion del programa
Modificacion del programaModificacion del programa
Modificacion del programa
 
Assignement of programming & problem solving ass.(3)
Assignement of programming & problem solving ass.(3)Assignement of programming & problem solving ass.(3)
Assignement of programming & problem solving ass.(3)
 
Oops in c++
Oops in c++Oops in c++
Oops in c++
 
Perl6 operators and metaoperators
Perl6   operators and metaoperatorsPerl6   operators and metaoperators
Perl6 operators and metaoperators
 
8.1
8.18.1
8.1
 
Oprerator overloading
Oprerator overloadingOprerator overloading
Oprerator overloading
 
Bankers Algo Implementation
Bankers Algo ImplementationBankers Algo Implementation
Bankers Algo Implementation
 
10 3 다중 배열
10 3 다중 배열10 3 다중 배열
10 3 다중 배열
 
One dimensional operation of Array in C- language
One dimensional operation of Array in C- language One dimensional operation of Array in C- language
One dimensional operation of Array in C- language
 
C & Python Introduction
C & Python IntroductionC & Python Introduction
C & Python Introduction
 
Es84
Es84Es84
Es84
 
#2
#2#2
#2
 
Pratik Bakane C++
Pratik Bakane C++Pratik Bakane C++
Pratik Bakane C++
 
Factorial
FactorialFactorial
Factorial
 
week-2x
week-2xweek-2x
week-2x
 
Oopsprc1c
Oopsprc1cOopsprc1c
Oopsprc1c
 
Fred
FredFred
Fred
 
Insertion sort
Insertion sortInsertion sort
Insertion sort
 
Dti2143 lab sheet 8
Dti2143 lab sheet 8Dti2143 lab sheet 8
Dti2143 lab sheet 8
 
C programs pbq final
C programs pbq finalC programs pbq final
C programs pbq final
 

Similaire à 怖くない!Implicit!

Python Coroutines, Present and Future
Python Coroutines, Present and FuturePython Coroutines, Present and Future
Python Coroutines, Present and Futureemptysquare
 
JavaScript for PHP developers
JavaScript for PHP developersJavaScript for PHP developers
JavaScript for PHP developersStoyan Stefanov
 
WordPress Realtime - WordCamp São Paulo 2015
WordPress Realtime - WordCamp São Paulo 2015WordPress Realtime - WordCamp São Paulo 2015
WordPress Realtime - WordCamp São Paulo 2015Fernando Daciuk
 
Orsiso
OrsisoOrsiso
Orsisoe27
 
James Thomas - Serverless Machine Learning With TensorFlow - Codemotion Berli...
James Thomas - Serverless Machine Learning With TensorFlow - Codemotion Berli...James Thomas - Serverless Machine Learning With TensorFlow - Codemotion Berli...
James Thomas - Serverless Machine Learning With TensorFlow - Codemotion Berli...Codemotion
 
srcArtifact.javasrcArtifact.javaclassArtifactextendsCave{pub.docx
srcArtifact.javasrcArtifact.javaclassArtifactextendsCave{pub.docxsrcArtifact.javasrcArtifact.javaclassArtifactextendsCave{pub.docx
srcArtifact.javasrcArtifact.javaclassArtifactextendsCave{pub.docxwhitneyleman54422
 
And the Greatest of These Is ... Rack Support
And the Greatest of These Is ... Rack SupportAnd the Greatest of These Is ... Rack Support
And the Greatest of These Is ... Rack SupportBen Scofield
 
Writing testable js [by Ted Piotrowski]
Writing testable js [by Ted Piotrowski]Writing testable js [by Ted Piotrowski]
Writing testable js [by Ted Piotrowski]JavaScript Meetup HCMC
 
ViewController.swift Calculatorimport Cocoaimport UIKit.pdf
 ViewController.swift Calculatorimport Cocoaimport UIKit.pdf ViewController.swift Calculatorimport Cocoaimport UIKit.pdf
ViewController.swift Calculatorimport Cocoaimport UIKit.pdfarasanlethers
 
C++: Constructor, Copy Constructor and Assignment operator
C++: Constructor, Copy Constructor and Assignment operatorC++: Constructor, Copy Constructor and Assignment operator
C++: Constructor, Copy Constructor and Assignment operatorJussi Pohjolainen
 
TypeScript Introduction
TypeScript IntroductionTypeScript Introduction
TypeScript IntroductionDmitry Sheiko
 
The Strange World of Javascript and all its little Asynchronous Beasts
The Strange World of Javascript and all its little Asynchronous BeastsThe Strange World of Javascript and all its little Asynchronous Beasts
The Strange World of Javascript and all its little Asynchronous BeastsFederico Galassi
 
Akka Futures and Akka Remoting
Akka Futures  and Akka RemotingAkka Futures  and Akka Remoting
Akka Futures and Akka RemotingKnoldus Inc.
 
Object-Oriented Javascript
Object-Oriented JavascriptObject-Oriented Javascript
Object-Oriented Javascriptkvangork
 
Object-Oriented JavaScript
Object-Oriented JavaScriptObject-Oriented JavaScript
Object-Oriented JavaScriptkvangork
 

Similaire à 怖くない!Implicit! (20)

Python Coroutines, Present and Future
Python Coroutines, Present and FuturePython Coroutines, Present and Future
Python Coroutines, Present and Future
 
JavaScript for PHP developers
JavaScript for PHP developersJavaScript for PHP developers
JavaScript for PHP developers
 
WordPress Realtime - WordCamp São Paulo 2015
WordPress Realtime - WordCamp São Paulo 2015WordPress Realtime - WordCamp São Paulo 2015
WordPress Realtime - WordCamp São Paulo 2015
 
Orsiso
OrsisoOrsiso
Orsiso
 
James Thomas - Serverless Machine Learning With TensorFlow - Codemotion Berli...
James Thomas - Serverless Machine Learning With TensorFlow - Codemotion Berli...James Thomas - Serverless Machine Learning With TensorFlow - Codemotion Berli...
James Thomas - Serverless Machine Learning With TensorFlow - Codemotion Berli...
 
srcArtifact.javasrcArtifact.javaclassArtifactextendsCave{pub.docx
srcArtifact.javasrcArtifact.javaclassArtifactextendsCave{pub.docxsrcArtifact.javasrcArtifact.javaclassArtifactextendsCave{pub.docx
srcArtifact.javasrcArtifact.javaclassArtifactextendsCave{pub.docx
 
And the Greatest of These Is ... Rack Support
And the Greatest of These Is ... Rack SupportAnd the Greatest of These Is ... Rack Support
And the Greatest of These Is ... Rack Support
 
Writing testable js [by Ted Piotrowski]
Writing testable js [by Ted Piotrowski]Writing testable js [by Ted Piotrowski]
Writing testable js [by Ted Piotrowski]
 
ViewController.swift Calculatorimport Cocoaimport UIKit.pdf
 ViewController.swift Calculatorimport Cocoaimport UIKit.pdf ViewController.swift Calculatorimport Cocoaimport UIKit.pdf
ViewController.swift Calculatorimport Cocoaimport UIKit.pdf
 
Kotlin Generation
Kotlin GenerationKotlin Generation
Kotlin Generation
 
Php 5.6
Php 5.6Php 5.6
Php 5.6
 
C++: Constructor, Copy Constructor and Assignment operator
C++: Constructor, Copy Constructor and Assignment operatorC++: Constructor, Copy Constructor and Assignment operator
C++: Constructor, Copy Constructor and Assignment operator
 
TypeScript Introduction
TypeScript IntroductionTypeScript Introduction
TypeScript Introduction
 
Dojo and Adobe AIR
Dojo and Adobe AIRDojo and Adobe AIR
Dojo and Adobe AIR
 
The Strange World of Javascript and all its little Asynchronous Beasts
The Strange World of Javascript and all its little Asynchronous BeastsThe Strange World of Javascript and all its little Asynchronous Beasts
The Strange World of Javascript and all its little Asynchronous Beasts
 
Fact, Fiction, and FP
Fact, Fiction, and FPFact, Fiction, and FP
Fact, Fiction, and FP
 
Javascript - Beyond-jQuery
Javascript - Beyond-jQueryJavascript - Beyond-jQuery
Javascript - Beyond-jQuery
 
Akka Futures and Akka Remoting
Akka Futures  and Akka RemotingAkka Futures  and Akka Remoting
Akka Futures and Akka Remoting
 
Object-Oriented Javascript
Object-Oriented JavascriptObject-Oriented Javascript
Object-Oriented Javascript
 
Object-Oriented JavaScript
Object-Oriented JavaScriptObject-Oriented JavaScript
Object-Oriented JavaScript
 

Plus de HonMarkHunt

俺のTerraform CI/CD ライフサイクル
俺のTerraform CI/CD ライフサイクル俺のTerraform CI/CD ライフサイクル
俺のTerraform CI/CD ライフサイクルHonMarkHunt
 
CircleCI vs. CodePipeline
CircleCI vs. CodePipelineCircleCI vs. CodePipeline
CircleCI vs. CodePipelineHonMarkHunt
 
Introduce Shinjuku.LT
Introduce Shinjuku.LTIntroduce Shinjuku.LT
Introduce Shinjuku.LTHonMarkHunt
 
I don't use kubernetes.
I don't use kubernetes.I don't use kubernetes.
I don't use kubernetes.HonMarkHunt
 
エンジニアのUI/UXはじめの一歩
エンジニアのUI/UXはじめの一歩エンジニアのUI/UXはじめの一歩
エンジニアのUI/UXはじめの一歩HonMarkHunt
 
Netflixで見れるおすすめ作品10本
Netflixで見れるおすすめ作品10本Netflixで見れるおすすめ作品10本
Netflixで見れるおすすめ作品10本HonMarkHunt
 
アドテクやってるエンジニアだけど、どうしても伝えたいことがある。
アドテクやってるエンジニアだけど、どうしても伝えたいことがある。アドテクやってるエンジニアだけど、どうしても伝えたいことがある。
アドテクやってるエンジニアだけど、どうしても伝えたいことがある。HonMarkHunt
 
How to managed your kicks!!
How to managed your kicks!!How to managed your kicks!!
How to managed your kicks!!HonMarkHunt
 
新日本プロレスに学ぶエンジニアのキャリアプラン
新日本プロレスに学ぶエンジニアのキャリアプラン新日本プロレスに学ぶエンジニアのキャリアプラン
新日本プロレスに学ぶエンジニアのキャリアプランHonMarkHunt
 
LINE Messaging apiと戯れる
LINE Messaging apiと戯れるLINE Messaging apiと戯れる
LINE Messaging apiと戯れるHonMarkHunt
 
正しい開発をする
正しい開発をする正しい開発をする
正しい開発をするHonMarkHunt
 
Java9新機能概要
Java9新機能概要Java9新機能概要
Java9新機能概要HonMarkHunt
 

Plus de HonMarkHunt (12)

俺のTerraform CI/CD ライフサイクル
俺のTerraform CI/CD ライフサイクル俺のTerraform CI/CD ライフサイクル
俺のTerraform CI/CD ライフサイクル
 
CircleCI vs. CodePipeline
CircleCI vs. CodePipelineCircleCI vs. CodePipeline
CircleCI vs. CodePipeline
 
Introduce Shinjuku.LT
Introduce Shinjuku.LTIntroduce Shinjuku.LT
Introduce Shinjuku.LT
 
I don't use kubernetes.
I don't use kubernetes.I don't use kubernetes.
I don't use kubernetes.
 
エンジニアのUI/UXはじめの一歩
エンジニアのUI/UXはじめの一歩エンジニアのUI/UXはじめの一歩
エンジニアのUI/UXはじめの一歩
 
Netflixで見れるおすすめ作品10本
Netflixで見れるおすすめ作品10本Netflixで見れるおすすめ作品10本
Netflixで見れるおすすめ作品10本
 
アドテクやってるエンジニアだけど、どうしても伝えたいことがある。
アドテクやってるエンジニアだけど、どうしても伝えたいことがある。アドテクやってるエンジニアだけど、どうしても伝えたいことがある。
アドテクやってるエンジニアだけど、どうしても伝えたいことがある。
 
How to managed your kicks!!
How to managed your kicks!!How to managed your kicks!!
How to managed your kicks!!
 
新日本プロレスに学ぶエンジニアのキャリアプラン
新日本プロレスに学ぶエンジニアのキャリアプラン新日本プロレスに学ぶエンジニアのキャリアプラン
新日本プロレスに学ぶエンジニアのキャリアプラン
 
LINE Messaging apiと戯れる
LINE Messaging apiと戯れるLINE Messaging apiと戯れる
LINE Messaging apiと戯れる
 
正しい開発をする
正しい開発をする正しい開発をする
正しい開発をする
 
Java9新機能概要
Java9新機能概要Java9新機能概要
Java9新機能概要
 

Dernier

Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxKartikeyaDwivedi3
 
Transport layer issues and challenges - Guide
Transport layer issues and challenges - GuideTransport layer issues and challenges - Guide
Transport layer issues and challenges - GuideGOPINATHS437943
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionDr.Costas Sachpazis
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort servicejennyeacort
 
Introduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHIntroduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHC Sai Kiran
 
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfgUnit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfgsaravananr517913
 
Risk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfRisk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfROCENODodongVILLACER
 
Input Output Management in Operating System
Input Output Management in Operating SystemInput Output Management in Operating System
Input Output Management in Operating SystemRashmi Bhat
 
NO1 Certified Black Magic Specialist Expert Amil baba in Uae Dubai Abu Dhabi ...
NO1 Certified Black Magic Specialist Expert Amil baba in Uae Dubai Abu Dhabi ...NO1 Certified Black Magic Specialist Expert Amil baba in Uae Dubai Abu Dhabi ...
NO1 Certified Black Magic Specialist Expert Amil baba in Uae Dubai Abu Dhabi ...Amil Baba Dawood bangali
 
home automation using Arduino by Aditya Prasad
home automation using Arduino by Aditya Prasadhome automation using Arduino by Aditya Prasad
home automation using Arduino by Aditya Prasadaditya806802
 
Vishratwadi & Ghorpadi Bridge Tender documents
Vishratwadi & Ghorpadi Bridge Tender documentsVishratwadi & Ghorpadi Bridge Tender documents
Vishratwadi & Ghorpadi Bridge Tender documentsSachinPawar510423
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girlsssuser7cb4ff
 
Energy Awareness training ppt for manufacturing process.pptx
Energy Awareness training ppt for manufacturing process.pptxEnergy Awareness training ppt for manufacturing process.pptx
Energy Awareness training ppt for manufacturing process.pptxsiddharthjain2303
 
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsyncWhy does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsyncssuser2ae721
 
Indian Dairy Industry Present Status and.ppt
Indian Dairy Industry Present Status and.pptIndian Dairy Industry Present Status and.ppt
Indian Dairy Industry Present Status and.pptMadan Karki
 
National Level Hackathon Participation Certificate.pdf
National Level Hackathon Participation Certificate.pdfNational Level Hackathon Participation Certificate.pdf
National Level Hackathon Participation Certificate.pdfRajuKanojiya4
 
welding defects observed during the welding
welding defects observed during the weldingwelding defects observed during the welding
welding defects observed during the weldingMuhammadUzairLiaqat
 

Dernier (20)

Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptx
 
Transport layer issues and challenges - Guide
Transport layer issues and challenges - GuideTransport layer issues and challenges - Guide
Transport layer issues and challenges - Guide
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
 
Design and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdfDesign and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdf
 
Introduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHIntroduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECH
 
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfgUnit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
 
Risk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfRisk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdf
 
Input Output Management in Operating System
Input Output Management in Operating SystemInput Output Management in Operating System
Input Output Management in Operating System
 
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
 
NO1 Certified Black Magic Specialist Expert Amil baba in Uae Dubai Abu Dhabi ...
NO1 Certified Black Magic Specialist Expert Amil baba in Uae Dubai Abu Dhabi ...NO1 Certified Black Magic Specialist Expert Amil baba in Uae Dubai Abu Dhabi ...
NO1 Certified Black Magic Specialist Expert Amil baba in Uae Dubai Abu Dhabi ...
 
home automation using Arduino by Aditya Prasad
home automation using Arduino by Aditya Prasadhome automation using Arduino by Aditya Prasad
home automation using Arduino by Aditya Prasad
 
Vishratwadi & Ghorpadi Bridge Tender documents
Vishratwadi & Ghorpadi Bridge Tender documentsVishratwadi & Ghorpadi Bridge Tender documents
Vishratwadi & Ghorpadi Bridge Tender documents
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girls
 
Energy Awareness training ppt for manufacturing process.pptx
Energy Awareness training ppt for manufacturing process.pptxEnergy Awareness training ppt for manufacturing process.pptx
Energy Awareness training ppt for manufacturing process.pptx
 
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsyncWhy does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
 
Indian Dairy Industry Present Status and.ppt
Indian Dairy Industry Present Status and.pptIndian Dairy Industry Present Status and.ppt
Indian Dairy Industry Present Status and.ppt
 
National Level Hackathon Participation Certificate.pdf
National Level Hackathon Participation Certificate.pdfNational Level Hackathon Participation Certificate.pdf
National Level Hackathon Participation Certificate.pdf
 
welding defects observed during the welding
welding defects observed during the weldingwelding defects observed during the welding
welding defects observed during the welding
 
POWER SYSTEMS-1 Complete notes examples
POWER SYSTEMS-1 Complete notes  examplesPOWER SYSTEMS-1 Complete notes  examples
POWER SYSTEMS-1 Complete notes examples
 

怖くない!Implicit!

  • 1.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11. // `ExecutionContext` 
 def getEmployee(id: Int)(implicit e: ExecutionContext): Future[Employee] = ??? def getRole(employee :Employee)(implicit e: ExecutionContext): Future[Role] = ???
  • 12. // `ExecutionContext` 
 def getEmployee(id: Int)(implicit e: ExecutionContext): Future[Employee] = ??? def getRole(employee :Employee)(implicit e: ExecutionContext): Future[Role] = ???
  • 13. // `ExecutionContext` 
 def getEmployee(id: Int)(implicit e: ExecutionContext): Future[Employee] = ??? def getRole(employee :Employee)(implicit e: ExecutionContext): Future[Role] = ??? val ec: ExecutionContext = scala.concurrent.ExecutionContext.Implicits.global val bigEmployee: Future[EmployeeWithRole] = getEmployee(100)(ec).flatMap { e => getRole(e)(ec).map { r => EmployeeWithRole(e.id, e.name,r) }(ec) }(ec)
  • 14. // `ExecutionContext` 
 def getEmployee(id: Int)(implicit e: ExecutionContext): Future[Employee] = ??? def getRole(employee :Employee)(implicit e: ExecutionContext): Future[Role] = ??? val ec: ExecutionContext = scala.concurrent.ExecutionContext.Implicits.global val bigEmployee: Future[EmployeeWithRole] = getEmployee(100)(ec).flatMap { e => getRole(e)(ec).map { r => EmployeeWithRole(e.id, e.name,r) }(ec) }(ec)
  • 15. // `ExecutionContext` 
 def getEmployee(id: Int)(implicit e: ExecutionContext): Future[Employee] = ??? def getRole(employee :Employee)(implicit e: ExecutionContext): Future[Role] = ??? val ec: ExecutionContext = scala.concurrent.ExecutionContext.Implicits.global val bigEmployee: Future[EmployeeWithRole] = getEmployee(100)(ec).flatMap { e => getRole(e)(ec).map { r => EmployeeWithRole(e.id, e.name,r) }(ec) }(ec) 🤔🤔🤔
  • 16. // `ExecutionContext` 
 def getEmployee(id: Int)(implicit e: ExecutionContext): Future[Employee] = ??? def getRole(employee :Employee)(implicit e: ExecutionContext): Future[Role] = ??? implicit val ec: ExecutionContext = scala.concurrent.ExecutionContext.Implicits.global val bigEmployee: Future[EmployeeWithRole] = getEmployee(100).flatMap { e => getRole(e).map { r => EmployeeWithRole(e.id, e.name,r) } }
  • 17. // `ExecutionContext` 
 def getEmployee(id: Int)(implicit e: ExecutionContext): Future[Employee] = ??? def getRole(employee :Employee)(implicit e: ExecutionContext): Future[Role] = ??? implicit val ec: ExecutionContext = scala.concurrent.ExecutionContext.Implicits.global val bigEmployee: Future[EmployeeWithRole] = getEmployee(100).flatMap { e => getRole(e).map { r => EmployeeWithRole(e.id, e.name,r) } }
  • 18. // `ExecutionContext` 
 def getEmployee(id: Int)(implicit e: ExecutionContext): Future[Employee] = ??? def getRole(employee :Employee)(implicit e: ExecutionContext): Future[Role] = ??? implicit val ec: ExecutionContext = scala.concurrent.ExecutionContext.Implicits.global val bigEmployee: Future[EmployeeWithRole] = getEmployee(100).flatMap { e => getRole(e).map { r => EmployeeWithRole(e.id, e.name,r) } } 😇😇😇
  • 19.
  • 20.
  • 21. 😇