# HG changeset patch # User jbe # Date 1408960982 -7200 # Node ID 598f61d934027f7eba11acae40a90459bcbd56ab # Parent facf29831f6f6b8d3d00b4ef60366d78e401ed15 Changed introduction in README diff -r facf29831f6f -r 598f61d93402 README --- a/README Mon Aug 25 11:38:47 2014 +0200 +++ b/README Mon Aug 25 12:03:02 2014 +0200 @@ -1,13 +1,13 @@ seqlua: Extension for handling sequential data in Lua ===================================================== -This is an experimental package to extend Lua in the following manner: +This package is an extension for the Lua language which: -* allow ``ipairs(seq)`` to accept either tables or functions (i.e function +* allows ``ipairs(seq)`` to accept either tables or functions (i.e function iterators) as an argument, -* add a new function ``string.concat(separator, seq)`` that concats either +* adds a new function ``string.concat(separator, seq)`` that concats either table entries or function return values, -* provide auxiliary C functions and macros to simplify iterating over both +* provides auxiliary C functions and macros to simplify iterating over both tables and iterator functions with a generic statement. Existing ``__ipairs`` or ``__index`` (but not ``__len``) metamethods are @@ -18,6 +18,11 @@ Metamethod handling in detail is explained in the last section ("Respected metamethods") at the bottom of this README. +In Lua, this extension is loaded by ``require "seqlua"``. In order to use the +auxiliary C functions and macros, add ``#include `` to your C file +and ensure that the functions implemented in ``seqlualib.c`` are statically or +dynamically linked with your C Lua library. + Motivation