Book Image

Getting Started with Julia

By : Ivo Balbaert
Book Image

Getting Started with Julia

By: Ivo Balbaert

Overview of this book

Table of Contents (19 chapters)
Getting Started with Julia
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
The Rationale for Julia
Index

Chapter 3. Functions

Julia is foremost a functional language because computations and data transformations are done through functions; they are first-class citizens in Julia. Programs are structured around defining functions and to overload them for different combinations of argument types. This chapter discusses this keystone concept, covering the following topics:

  • Defining functions

  • Optional and keyword arguments

  • Anonymous functions

  • First-class functions and closures

  • Recursive functions

  • Map, filter, and list comprehensions

  • Generic functions and multiple dispatch