The ability to reply to discussions is limited to PRO members. Want to join in the discussion? Click here to subscribe now.

Handle Branching Logic with Ramda's Conditional Functions

Handle Branching Logic with Ramda's Conditional Functions

5:30
When you want to build your logic with small, composable functions you need a functional way to handle conditional logic. You _could_ wrap ternary expressions and if/else statements in functions, handling all of the concerns around data mutation yourself, or you could leverage the conditional functions supplied by Ramda. In this lesson, we'll cover several of Ramda's conditional functions: `ifElse`, `unless`, `when` and `cond`
Watch this lesson now
Avatar
egghead.io

When you want to build your logic with small, composable functions you need a functional way to handle conditional logic. You could wrap ternary expressions and if/else statements in functions, handling all of the concerns around data mutation yourself, or you could leverage the conditional functions supplied by Ramda. In this lesson, we'll cover several of Ramda's conditional functions: ifElse, unless, when and cond

HEY, QUICK QUESTION!
Joel's Head
Why are we asking?