refactor(all): language tree adaption (#1105)

This commit is contained in:
Steven Sojka 2021-03-30 08:18:24 -05:00 committed by GitHub
parent 0df7c4aa39
commit 6863f79118
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 198 additions and 61 deletions

View file

@ -166,4 +166,16 @@ function M.difference(tbl1, tbl2)
end)
end
function M.identity(a)
return a
end
function M.constant(a)
return function() return a end
end
function M.to_func(a)
return type(a) == 'function' and a or M.constant(a)
end
return M