Busy. Please wait.
Log in with Clever
or

show password
Forgot Password?

Don't have an account?  Sign up 
Sign up using Clever
or

Username is available taken
show password

Your email address is only used to allow you to reset your password. See our Privacy Policy and Terms of Service.


Already a StudyStack user? Log In

Reset Password
Enter the associated with your account, and we'll email you a link to reset your password.

Flash Cards to language Scala

        Help!  

Term
Definition
1)Expressão: Qualquer pedaço de código Scala que produz um resultado. Você também pode dizer que uma expressão avalia para um resultado ou resultados em um valor.   show
🗑
2)Aninhamento de funções: Construção de muitas pequenas funções auxiliares.   show
🗑
3)Parâmetro: As funções podem ter de zero a muitos parâmetros. Cada parâmetro tem um nome e um tipo. . A distinção entre parâmetros e argumentos é que os argumentos se referem aos objetos reais passados quando uma função é chamada.   show
🗑
show (x: Int) => x * x def sumInts(a: Int, b: Int): Int = sum((x: Int) => x, a, b) def sumSquares(a: Int, b: Int): Int = sum((x: Int) => x * x, a, b)  
🗑
show var r val s  
🗑
6)Classes abstratas: Classes abstratas podem ter membros protegidos (deferred) que são declarados, mas que não tem uma implementação. Uma classe abstrata pode ter membros não implementados, nenhum objeto daquela classe pode ser criado usando new.   show
🗑
show trait IntSet { def incl(x: Int): IntSet def contains(x: Int): Boolean }  
🗑
8)Objeto: Entidade de uma classe, um objeto segue a sintaxe da definição de uma classe; tem uma cláusula opcional extends, bem como um corpo opcional.   show
🗑
9)Casamento de Padrão: O casamento de padrões é uma generalização do comando switch do C ou Java para hierarquias de classes.   show
🗑
show def divmod(x: Int, y: Int): (Int, Int) = (x / y, x % y) divmod(x, y) match { case (n, d) => println("quotient: " + n + ", rest: " + d)  
🗑
show package scala trait Function1[-A, +B] { def apply(x: A): B }  
🗑
show val fruit: List[String] = List("apples", "oranges", "pears") val nums : List[Int] = List(1, 2, 3, 4) val diag3: List[List[Int]] = List(List(1, 0, 0), List(0, 1, 0), List(0, 0, 1)) val empty: List[Int] = List()  
🗑
show import scala.actors.Actor abstract class AuctionMessage case class Offer(bid: Int, client: Actor) extends AuctionMessage case class Inquire(client: Actor) extends AuctionMessage  
🗑
show class Carro(modelo: String, ano: Int, cor: String) { var corAtual = cor def pintar(novaCor: String){ corAtual = novaCor } }  
🗑
show object CarroApplication extends App { val carro = new Carro("307", 2008, "prata") val carro2 = new Carro(2010) println("Carro: " + carro) carro.pintar("preto") println("Carro: " + carro) println("Carro2: " + carro2) }  
🗑
16)Expressões regulares: É um meio de se fazer buscar de determinadas porções de textos, ou seja, um método simples de manipulação e combinação avançadas de strings.   show
🗑
show def deleteFiles(file: File): Boolean = { if (file.isDirectory) { for(f <- file.listFiles){ deleteFiles(f) } } file.delete }  
🗑
18)Recursividade de cauda: Uma função é recursiva de cauda se o único 18)lugar onde a função chama a si mesmo é a última operação da função.   show
🗑
19)Herança: É um tipo de extensão da classe, pode se pegar uma classe já implementada 19)anteriormente e criar uma classe derivada com atributos e métodos distintos da classe Pai.   show
🗑
20)Currying: E a técnica de transformar uma função que recebe vários argumentos em uma função que recebe um único argumento (os outros argumentos tendo sido especificado pelo curry).   show
🗑


   

Review the information in the table. When you are ready to quiz yourself you can hide individual columns or the entire table. Then you can click on the empty cells to reveal the answer. Try to recall what will be displayed before clicking the empty cell.
 
To hide a column, click on the column name.
 
To hide the entire table, click on the "Hide All" button.
 
You may also shuffle the rows of the table by clicking on the "Shuffle" button.
 
Or sort by any of the columns using the down arrow next to any column heading.
If you know all the data on any row, you can temporarily remove it by tapping the trash can to the right of the row.

 
Embed Code - If you would like this activity on your web page, copy the script below and paste it into your web page.

  Normal Size     Small Size show me how
Created by: 1370642565
Popular Engineering sets