[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: special forms, take two (was Re: A lua version of "amb")
- From: Dirk Laurie <dirk.laurie@...>
- Date: Tue, 28 Feb 2012 14:20:08 +0200
> But limited use of 'functional idioms' can make
> mostly-imperative programs easier to read and write.
>
> -- sort in the wrong order
> table.sort(T,|x,y|(x > y))
>
Easier to write, maybe. But really easier to read than this?
down = function(x,y) return x>y end
table.sort(T,down)