ModelMap.pick

Returns a single value from the mapping, based on the return value of a delegate

class ModelMap(TKey, TValue)
TValue
pick
(
bool delegate
(
TValue
)
f
,
TValue def = null
)

Parameters

f bool delegate
(
TValue
)

a delegate which returns true if the value passed in matches.

def TValue

default value to return if nothing matches.

Meta