55th: Scala infix type in the actual combat detailed

Source: Internet
Author: User

Today learn the infix type of knowledge, to see the actual combat code:

def main (args:array[string]) {
Object Log {def >>:(data:string): Log.type = {println (data); log}}
"Hadoop" >>: "Spark" >>: Log

Val list = list ()
Val newlist = "A":: "B":: List
println (NewList)

Class Infix_type[a,b]
Val infix:int infix_type String = null

Case Class Cons (first:string,second:string)
Val case_class = Cons ("One", "one", "one")
Case_class Match {case "one" Cons "one" and "println" ("Spark!!!")}

}
}

Share more of the Scala resources:

Baidu Cloud Disk: http://pan.baidu.com/s/1gd7133t

Micro Cloud Disk: http://share.weiyun.com/047efd6cc76d6c0cb21605cfaa88c416

360 Cloud Disk: Http://yunpan.cn/cQN9gvcKXe26M (extract code: 13CD)

Information from DT Big Data Dream Factory public account: Dt_spark

Follow the account for more information about Scala learning

55th: Scala infix type in the actual combat detailed

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.