lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


There is an interesting language called SequenceL which has implicit mapping.

See the Search example at:

http://lambda-the-ultimate.org/node/3635#comment

A Lua-like equivalent syntax would be something like:

Search = mapper (Target,{Subscript,Word}) return Word == Target and Subscript ;

Search('f'ox',[{1,'dog'},{2,'cat'},{3,'fox'},{4,'parrot'}}) → 3

This is not a syntax or a Lua extension suggestion ;)  Just another
neat way to look at the map issue.  It's the kind of thing which
Metalua or LuaMacro could implement relatively easily.

steve d.