alvin alexander
alvin alexander
Home search using google About Alvin Alexander rss feed Alvin Alexander on Twitter Donate to keep Alvin writing!
“Samadhi is the culmination of yoga; it is a state of bliss and union with the universal spirit.”
~ B.K.S. Iyengar

“I have no idea who that guy was, but I know that he just reset our karmic destiny.”
 
~ from the book, Love Everyone
(affiliate link)

Scala - How to declare an empty immutable Set (SortedSet)

By Alvin Alexander. Last updated: April 14, 2023

I just saw this code that shows how to declare an empty immutable SortedSet in Scala, and wanted to save it as a helpful snippet here:

var nodes: immutable.SortedSet[Address] = immutable.SortedSet.empty
scala
set
empty
scala
sortedset
sorted set
  • How to convert a Set to a SortedSet in Scala
  • How to create a mutable Set in Scala
  • How to use sortable Sets in Scala (SortedSet, TreeSet, LinkedHashSet)
  • Parsing “real world” HTML with Scala, HTMLCleaner, and StringEscapeUtils
  • How to use a Scala Set as a function predicate

books by alvin

  • Learn Functional Programming The Fast Way! (new book cover)
  • What’s the easiest way to learn functional programming?
  • Functional Programming, Simplified (a best-selling FP book)
  • Book: Learn Functional Programming The Fast Way! (FP for OOP developers)
  • Learn Scala 3 The Fast Way (book)
Links:
front page photo gallery scala linux/unix alvin on twitter privacy terms & conditions
alvinalexander.com
is owned and operated by
Valley Programming, LLC
 
In regards to links to Amazon.com, As an Amazon Associate
I (Valley Programming, LLC) earn from qualifying purchases
 
This website uses cookies: learn more
This website uses cookies: learn more

alvinalexander.com is owned and operated by Valley Programming, LLC

In regards to links to Amazon.com, “As an Amazon Associate
I (Valley Programming, LLC) earn from qualifying purchases”
 
 
java
java tutorials
android tutorials
java applets
java faqs
intellij idea
eclipse ide
jdbc
jsp’s
java servlets
jfc-swing
kotlin
perl
perl tutorials
perl faqs
perl recipes
perl tutorials
Unix
linux tutorials
unix by example
tutorials
man (help) pages
programming
scala tutorials
drupal
flutter/dart
git
haskell
oop
php
mysql
postgresql
ruby
sencha
best practices
programming
software dev
testing
uml
misc
privacy policy
terms & conditions
apple/mac/iphone
career
design
funny/humor
function point
analysis (fpa)
fpa tutorial
gadgets
technology
LaTeX
alaska
colorado
cvs tutorials
wincvs tutorial
free video courses
free scala 3 video course
free functional programming video course
free advanced scala 3 video course
other
contact me
rss feed
my photos
inspirational quotes
investing
'personal' posts
science
zen, mindfulness
life in alaska
living in talkeetna, alaska