Bug fixes and tests for methods scanl(), scanl1(), scanr() and scanr1().