Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

LuaJIT

Name: LuaJIT 2012-02-25 0:48

LuaJIT

Name: Anonymous 2012-02-25 18:35

>>14
actually this is my biggest beef with Lua: mutable data structures. The language is awkwardly "almost functional." I would love Lua with immutable persistent tables so that you could compare equality and key by them and do all sorts of functional shenanigans. Lua should be more like its second cousin Clojure.


>>21
what the fuck? does unpack even take more than one argument? what you smokin, son?

function car(l) return l[1] end
function cdr(l) return l[2] end
function cons(a,l) return {a,l} end
function map1(f,l)
  local r
  if l then
    return cons(f(car(l),map1(f,cdr(l)))
  end
end

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List