=&gt; URIO[R, Double]) if your field calculation returns an effect</span>
  maxCost<span class="token punctuation">(</span><span class="token number">100</span><span class="token punctuation">)</span><span class="token punctuation">(</span>CostEstimation<span class="token punctuation">.</span>costDirective<span class="token punctuation">)</span>
  <span class="token comment">// or maxCostOrError(maxCost)(f: Double =&gt; ValidationError) to specify a different error</span>
  <span class="token comment">// or