Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public string GetSequence()
- {
- string sequence = "[ ";
- sequence += this.ListSequence.Aggregate(
- new StringBuilder(),
- (current, next) => current.Append(current.Length == 0 ? "" : " ").Append(next)).ToString();
- sequence += " ]";
- return sequence;
- }
- // Produces [ 1 1 2 3 5 8 13 ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement