first

Returns optional front of range

alias first = from!"ddash.range".maybeFront

Examples

import optional: some, none;
assert([1, 2].first == some(1));
assert((int[]).init.first == none);

Meta

Since

- 0.0.1