Chapter 8: A Beginner's Tutorial To Using Scala's Collection Functions

By Nadim Bahadoor | Last updated: July 14, 2017 at 13:36 pm

In this section, we will go over how to use the rich set of Collection Functions that the Scala programming language provides.

 

Feel free to review Chapter 6 on Scala's Immutable Collection and Chapter 7 on Scala's Mutable Collection as we will be making use of these collections throughout this chapter.

 

Throughout the tutorials we will use the popular IntelliJ IDEA which we've setup in Chapter 1. I hope that by now you are more comfortable using IntelliJ. If not, feel free to review the previous tutorials from Chapter 1!

 

In this chapter, we will provide tutorials on the topics below. If none of these make any sense right now, that's OK :)

 

So let's get started!

 

Function aggregate Function collect Function diff
Function drop Function dropWhile Function exists
Functions filter & filterNot Function find Function flatMap
Function flatten Function fold Function foldLeft
Function foldRight Function foreach Function groupBy
Function head Function isEmpty Function intersect
Function last Function map Function max
Function maxBy Function mkString Function nonEmpty
Function par Function partition Function reduce
Function reduceLeft Function reduceRight Function reverse
Function reverseIterator Function scan Function scanLeft
Function scanRight Function size Function slice
Function sortBy Function sorted Function sortWith
Function tail Function take Function takeRight
Function takeWhile Function transpose Function union
Function unzip Function unzip3 Function view
Function withFilter Function zip Function zipWithIndex

 

Nadim Bahadoor on FacebookNadim Bahadoor on GithubNadim Bahadoor on LinkedinNadim Bahadoor on Twitter
Nadim Bahadoor
Senior Software Developer | Nephila Capital
Founder of allaboutscala.com. I have over 10 years of experience in building large scale real-time trading systems in the financial industry. Passionate about Distributed Systems, Scala, Big Data and Functional Programming. Stay in touch for upcoming tutorials!

Share this article on