module import type { Map } from './types/map' ; /**
 * Functional alternative to the ternary operator.
 * Enforces the same return type for both branches,
 * the result is evaluated lazily.
 */ export default function ternary < Value , Return > ( predicate , left , right ) { return ( value ) => { return predicate ( value ) ? left ( value ) : right ( value ) ; } ; }