RecordExtension<L, R> extension

Extension method that allows folding over a pair of values. The fold method takes two functions as arguments: left and right. If the first value of the pair is null, the right function is called with the second value. Otherwise, the left function is called with the first value. The result of the function call is returned.

on
  • (L?, R?)

Properties

left → L

Available on (L?, R?), provided by the RecordExtension extension

no setter

Available on (L?, R?), provided by the RecordExtension extension

no setter

Methods

fold<E>(E left(L? l), E right(R r)) → E

Available on (L?, R?), provided by the RecordExtension extension