Scala Partially Applied Functions | Tutorial
Tutorial --
- Home
- HTML
- JavaScript
- CSS
- Vue
- React
- Python3
- Java
- C
- C++
- C#
- AI
- Go
- SQL
- Linux
- VS Code
- Bootstrap
- Git
- Local Bookmarks
Scala Tutorial
Scala TutorialScala IntroductionScala Installation and Environment ConfigurationScala Basic SyntaxScala Data TypesScala Literals Scala Escape Characters Scala VariablesScala Access ModifiersScala OperatorsScala IF...ELSE StatementsScala LoopsScala Methods and FunctionsScala ClosuresScala StringsScala ArraysScala CollectionScala IteratorScala Classes and ObjectsScala TraitScala Pattern MatchingScala Regular ExpressionsScala Exception HandlingScala ExtractorScala File I/O
Scala Partially Applied Functions
Scala partially applied functions are expressions where you do not need to provide all the parameters required by the function; you only need to provide some, or none, of the required parameters.
In the following example, we print log information:
import java.util.Date
object Test {
def main(args: Array) {
val date = new Date
log(date, "message1" )
Thread.sleep(1000)
import java.util.Date
object Test {
def main(args: Array) {
val date = new Date
log(date, "message1" )
Thread.sleep(1000)
YouTip