Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to use the Scala For statement segment

Shulou Source: shulou.com Published: 2022-05-31 21:24:39 09月22日 Update

This article introduces the knowledge of "how to use Scala For sentence segments". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

For statement segment

Syntax:

Expr1:: = "for" ("(" Enumerators ")" | "{" Enumerators

"}") {nl} ["yield"] Expr

Enumerators:: = Generator {semi Enumerator}

Enumerator:: = Generator

| | Guard |

| | "val" Pattern1 "=" Expr |

Generator:: = Pattern1 "

Tags: Statement generator translation expression function name vector matrix example different two code content follow sequence method more pattern knowledge type Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno macOS Huawei MariaDB Linux vpn