Adám Brudzewsky
APL operators (higher-order functions) offer powerful ways to apply functions to data. While Dyalog provides plenty of powerful operators, you can define your own to accomplish additional tasks. In this webinar, we show the basic syntax of user-defined operators and present a few utilities, compositions, and conceptual tools.
Slides PPTX: https://www.dyalog.com/uploads/files/...
Slides PDF: https://www.dyalog.com/uploads/files/...
00:00 Introduction
01:42 What is an operator? Operator and derived function valence
05:50 How to define operators, traditional and dops
11:35 _S: Stack arguments on the result of applying a function
15:11 Make an operator derive ambivalent functions
16:50 _T: An operator to trace through an expression function-by-function
18:38 Get the definition of an operand function using ⎕ATX
20:28 _A_: Across: Apply a function with the arguments flipped both ways; apply a function and its commute. Particularly useful with set functions such as ∊ ⍳ ~
23:56 Reverse-compose AKA Hook to apply a function after pre-processing the argument
28:56 _W_: The While operator as a functional alternative to :While
33:16 _E_: The Error-Else operator to modify behaviour in the case of an error
34:47 Let operators use function or array operands using (⍺⍺⊣⊢) or (⍵⍵⊣⊢)
38:20 _0: Apply non-scalar functions to simple scalars AKA scalar pervasion, like dfns.perv but with selective assignment
42:57 Conclusion
--------------------
GET STARTED
Download the latest version of Dyalog:
https://www.dyalog.com/downloads
TAKE PART IN OUR APL COMPETITIONS
THE APL CHALLENGE
Learn APL and compete for one of three $100 prizes. Open to all experience levels.
https://challenge.dyalog.com
THE APL FORGE
Got a problem to solve or a library to share?
Use Dyalog APL to build something great — and win £2,500 + an expenses-paid trip to present at a Dyalog user meeting.
https://forge.dyalog.com
--------------------