length method

int length()

Implementation

int length() => foldLeft(0, (b, _) => b + 1);