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

Read:

Do:

  • Write your own unless macro. You may use either your if from the chapter or the standard library if:
    • Does using the standard library, if, produce a deeper AST than using case directly?
  • Write your own while macro:
    • Use the test WhileTest module to make sure it functions correctly.
    • Add a test case for a break statement. (Hint: It will look similar to the test case provided.) Now add break to your macro.

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