Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I know nothing about LUA syntax, so I also have no idea which part of this is new and which part is ordinary LUA.

Is -- calculate sum(x for x^2 in 1..n) a comment or is it the output of a code transform?



"--" are comments in Lua, also, sorry for being pedantic but its Lua not LUA. Its Portuguese for moon.


The code is perfectly standard plain Lua.

The point is not about expressiveness; it's that while this code composes several higher-order functions, it's compiled into the kind of assembly code you'd expect from a fully optimized C routine.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: