[Library] Enumerable.lua (yet another collection library)

Showcase your libraries, tools and other projects that help your fellow love users.
Post Reply
billiam
Prole
Posts: 16
Joined: Wed Jan 14, 2015 2:14 am

[Library] Enumerable.lua (yet another collection library)

Post by billiam »

Link: https://github.com/billiam/enumerable.lua

A module that wraps sequence-like tables, and adds common utility methods, inspired by Ruby's array and collection classes

Quick example:

Code: Select all

local Enumerable = require('enumerable')
local sprites = Enumerable.create({sprite1, sprite2})

sprites:each(function(sprite) sprite:draw() end)
sprites:last():do_something()
sprites:unshift(sprite3)
sprites:pop()
--etc.
Docs: http://billiam.github.io/enumerable.lua
Additional usage examples: https://github.com/Billiam/enumerable.l ... e_spec.lua

Related projects: [edit] Adding lua-enumerable to related projects.
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 62 guests