Flow Control

Learn the different approaches that we can use to create different scenarios in a flow.

The clojure.core library also has a group of functions that we’ll use in this course to build our flows. As in any other programming language, we need to use conditionals, store values for future use, validate stuff, and sometimes include more than one possibility.

Validator’s helpers

One of the most commonly used functionalities that we normally assume any language will cover for us is the possibility of delivering more than one validation using logical and and or operations. Clojure not only has these functionalities but also treats them as functions themselves, so they may have two different usages:

  • Function as validations that return a boolean and might be combined with a conditional flow

  • Return their actual value, which in the and function will be a boolean, and in the or function might be whichever value it contains

So, they may be used in combination with conditionals but also by themselves, for instance, as results of a function.

Get hands-on with 1200+ tech skills courses.