Sophie

Sophie

distrib > Fedora > 16 > x86_64 > by-pkgid > f0dfd9eb28f7cd0c0b9542b665b27823 > files > 6

lua-penlight-examples-1.0.3-3.a.fc16.noarch.rpm

-- demonstrates how to use a list of callbacks
require 'pl'
actions = List()
L = utils.string_lambda

actions:append(function() print 'hello' end)
actions:append(L '|| print "yay"')

-- '()' is a shortcut for operator.call or function(x) return x() end
actions:foreach '()'