![]() ![]() The for-comprehension looks quite similar to a for-loop in imperative languages however, the difference is that it puts together a list of the results of alliterations. It can be used to iterate, filter, and return a rehearsed collection. You want to create a Scala for loop with multiple counters, such as when iterating over a multidimensional array. In Scala, a for-loop is also known as for-comprehensions. This is Recipe 3.2, How to use Scala for loops with multiple counters. As you will see in Chapter 12, you can often. This is an excerpt from the Scala Cookbook (partially modified for the internet). Is there any difference between the two following statements. 19 2.6 Advanced for Loops and for Comprehensions In Scala, loops are not used as often as in other languages. Scala ‑ perbedaan antara untuk setiap loop (Scala ‑ difference between for each loops) ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |