Returns 0 or 1 for Some depending on whether the predicate holds. Returns 0 for None.
0
1
It is a combination of Opt.filter and Opt.length.
opt('Mu').count(x => x.length > 3) // 0opt('Ichi').count(x => x.length > 3) // 1
count
Returns
0
or1
for Some depending on whether the predicate holds. Returns0
for None.It is a combination of Opt.filter and Opt.length.