From 42ec7286b2d36a9ba22925f816a17cb1cc2aa5ce Mon Sep 17 00:00:00 2001 From: chai Date: Sat, 30 Oct 2021 11:32:16 +0800 Subject: + Penlight --- .../docs/examples/test-listcallbacks.lua.html | 138 +++++++++++++++++++++ 1 file changed, 138 insertions(+) create mode 100644 Data/Libraries/Penlight/docs/examples/test-listcallbacks.lua.html (limited to 'Data/Libraries/Penlight/docs/examples/test-listcallbacks.lua.html') diff --git a/Data/Libraries/Penlight/docs/examples/test-listcallbacks.lua.html b/Data/Libraries/Penlight/docs/examples/test-listcallbacks.lua.html new file mode 100644 index 0000000..4416532 --- /dev/null +++ b/Data/Libraries/Penlight/docs/examples/test-listcallbacks.lua.html @@ -0,0 +1,138 @@ + + + + + Penlight Documentation + + + + +
+ +
+ +
+
+
+ + +
+ + + + + + +
+ +

test-listcallbacks.lua

+
+-- demonstrates how to use a list of callbacks
+local List = require 'pl.List'
+local utils = require 'pl.utils'
+local actions = List()
+local 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 '()'
+ + +
+
+
+generated by LDoc 1.4.6 +
+
+ + -- cgit v1.1-26-g67d0