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
Type: bool delegate(
TValue
)

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

def
Type: TValue

default value to return if nothing matches.

Meta