Nasal Callbacks Explained: Difference between revisions

Jump to navigation Jump to search
m
Use Nasal highlighter
mNo edit summary
m (Use Nasal highlighter)
Line 4: Line 4:


Consider the following snippet of code, which assigns a function to the say_hello symbol:
Consider the following snippet of code, which assigns a function to the say_hello symbol:
<syntaxhighlight lang="php">
<syntaxhighlight lang="nasal">


var say_hello = func() {
var say_hello = func() {
Line 17: Line 17:
But you could just as well call an anonymous function directly, without binding it to any symbolic name:
But you could just as well call an anonymous function directly, without binding it to any symbolic name:


<syntaxhighlight lang="php">
<syntaxhighlight lang="nasal">


(func() {
(func() {

Navigation menu