lookup method

Option<V> lookup(
  1. K key
)

Get the value at given key if present, otherwise return None.

Implementation

Option<V> lookup(K key) {
  var value = this[key];
  if (value != null) return some(value);
  if (containsKey(key)) return some(value as V);
  return const None();
}