LibFunctional-1.0

This project is abandoned.

Whether this project is out of date or its author marked it as abandoned, this project is no longer maintained.

If you wish to take this project over, please report it and state your intentions.

Library of helper functions that enable functional style programming and perform commonly used operations on lists and tables.

Example:

local fn = LibStub("LibFunctional-1.0")

local list = { 1, 2, 3, 4, 5 }

-- returns a list with the result of applying the specified function to all the values in the list
local mapped = fn.map(list, function(x) return x * 2 end)

-- returns the product of all the values in the list
local s = fn.reduce(mapped, function(a, b) return a * b end)

-- prints a sorted list of all the names of global variables that match "CHAT_FRAME"
local addmessage = fn.bind(DEFAULT_CHAT_FRAME.AddMessage, DEFAULT_CHAT_FRAME)
fn.each(fn.sort(fn.filter(fn.keys(_G), function(x) return string.match(x, "CHAT_FRAME") end)), addmessage)

See the API page for more details.

You must login to post a comment. Don't have an account? Register to get one!

Facts

Date created
Apr 21, 2013
Category
Last update
Oct 16, 2014
Development stage
Abandoned
License
BSD License
Downloads
2,516
Recent files

Authors

Relationships

Embedded library
LibStub