Merge: core: add `Sequence::get_or_default` and `get_or_null`
authorJean Privat <jean@pryen.org>
Fri, 12 Jan 2018 13:34:38 +0000 (08:34 -0500)
committerJean Privat <jean@pryen.org>
Fri, 12 Jan 2018 13:34:38 +0000 (08:34 -0500)
I though these existed. They do but only for `Map`s.

I just wanted to get an optional commande line argument without having to do an if.

~~~nit
# get the 2th command line argument, or else get null
var arg2 = args.get_nor_null(1)
~~~

I'm not fan of the names, but at least they are. If someone have better. Initially, I named it `try`, like `var arg2 = args.try(1)`.

Pull-Request: #2594


Trivial merge