© J.J. Merelo 2019
J. MereloPerl 6 Quick Syntax Referencehttps://doi.org/10.1007/978-1-4842-4956-7_8

8. Functions

Defining and Using Functions as First Class Citizens.
J. J. Merelo1 
(1)
Granada, Spain
 

Callables: Code, Blocks, and Routines

You have already seen in previous chapters how Perl 6, having functions as first class citizens, can produce chunks of code out of thin air and work with them. The title of this section lists the classes used for functions in increasing order of complexity. All of them are Callable; code is the simplest type that implements that role; blocks can define a signature or the name of the variables that will be used inside the code itself; a routine is a block that has its own name and can specify data that is going to ...

Get Perl 6 Quick Syntax Reference: A Pocket Guide to the Language, the Core Modules, and the Community now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.