lookup method
Return an Option that conditionally accesses map keys.
expect(
{ 'test': 123 }.lookup('test'),
some(123),
);
expect(
{ 'test': 123 }.lookup('foo'),
none(),
);
Implementation
Option<V> lookup(K key) => fromNullable(this[key]);