Re: special forms, take two (was Re: A lua version of "amb")
[
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: 2012年2月28日 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)