Update example code to compile with Swift 5.0/5.1 (#25995)
* Update example code to compile with Swift 5.0/5.1
Took inspiration from Filter.swift as to modern syntax to use, though didn't convert `private` properties to `internal`.
* simplify example code as requested
Removed private scope on properties to enable synthesized initializers; removed previously added explicit initializers; add necessary parameter label.
* Update stdlib/public/core/LazySequence.swift
remove ill advised usability change
Co-Authored-By: Xiaodi Wu <xiaodi.wu@gmail.com>
* Update stdlib/public/core/LazySequence.swift
Co-Authored-By: Xiaodi Wu <xiaodi.wu@gmail.com>