O'Reilly logo

Learning Elixir by Kenny Ballou

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Exercises

Do:

  • Write a test for odd length lists.
  • Practice our pattern matching and rewrite our mergesort to use pattern matching.
  • Rewrite our quicksort example from Chapter 3, Modules and Functions – Creating Functional Building Blocks, using if, case, and cond.
  • Advanced: Write a test for our mergesort that uses our Stream.repeatedly... pipe and Enum.sort/1 to make sure our mergesort really, really works. The result of this would be a step in the right direction for fuzz testing.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required