Susan Potter

Scala :: Mixing OO and FP paradigms since 2004


Flix Series Part 1: Higher-order functions & infix combinators

This article delves into the world of functional programming with the Flix programming language with higher-order functions and user-defined infix operators.


Getting Started with Flix, Part 0

Are you ready to embark on a coding adventure with Flix? This article introduces Flix, a programming language that combines the best features of functional languages like Scala and Haskell. But that's not all—Flix also brings its own innovative additions, such as row polymorphic extensible records and first-class support for Datalog constraints.


Scala WTFs - moments of confusion in the Scala REPL

Small sample of Scala WTFs circa 2014 from the REPL (many taken from Paul Phillips talks on the Scala Collections library): scala> List("a", "b", "c").toSet // the only reasonable line of code in here res1: scala.collection.immutable.Set[String] = Set(a, b, c) scala> List("a", "b", "c").toSet() // seen this when learning Scala first time. ROFL. res2: Boolean = false scala> List(1, 2) ::: List("a", "b") …


Scalaz By Example (An IO Taster)

Explore the building blocks in Scala using Scalaz that offer enormous benefits of algebraic thinking from domain modeling, validation, data types, and even the intricate realm of distributed systems. Wield the power of Scala's implicits, unleashing ad-hoc polymorphism to support functional programming abstractions like monoids, functors, applicatives and monads.


Algebraic Data Types

Unlock the power of algebraic data types to revolutionize your programming! Discover the flexibility of sum types, also known as tagged unions, and product types, also called record types. Dive into Scala examples and see how algebraic data types provide exhaustive and type-safe constructions. Explore the hybrid sum-product types and their applications in modeling complex domains like social network notifications. With algebraic data types, you can build robust and expressive …


Functional Algebra: Monoids Applied

In functional programming, words from Category Theory are thrown around, but how useful are they really? This session looks at applications of monoids specifically and how using their algebraic properties offers a solid foundation of reasoning in many types of business domains and reduces developer error as computational context complexity increases. This will provide a tiny peak at Category Theory's practical uses in software development and modeling. Code examples will …