12.3 Processing Sequences

Source: Internet
Author: User

12.3 Processing Sequences

Processing sequences, available in a wide range of choices ranging from low-level technology to controlling everything, but difficult to express more complex and usual processing patterns, to more advanced techniques, although not all we might want, but more elegant.

In C #, the lowest level (in addition to the direct implementation of the Ienumerable<t> interface) is to use an iterator block (iterator blocks) to read the input sequence, either using foreach or using an enumeration object; We can use predefined (or our own) higher-order methods, such as Where and Select, and if you only deal with certain actions, you can use the query syntax of C # 3.0.

The most common method of working with sequences in F # is similar to other collection types. As we have seen, lists can be handled with functions such as List.filter and List.map, and in the array module, there are functions similar to arrays, and it is not surprising that in the Seq module there is also a set of functions that deal with sequences. The F # language does not explicitly support any query syntax, but we will see that some of the ideas of sequence expressions are consistent with the idea behind low-level iterators and advanced queries.

12.3 Processing Sequences

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.