[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Short form for defining a function (Was: try-catch ...)
- From: steve donovan <steve.j.donovan@...>
- Date: Wed, 1 Jun 2016 08:18:46 +0200
On Wed, Jun 1, 2016 at 7:40 AM, Thomas Jericke <tjericke@indel.ch> wrote:
> That means you need to parse the function every time you run it, doesn't it?
> Also you can't access upvalues from your function.
Yes, it's the old 'string lambda' pattern - can obviously memomize the
function. I went through a period when I enjoyed this pattern but
it's mostly not worth the downsides. (It's still there in Penlight)
https://stevedonovan.github.io/Penlight/api/libraries/pl.utils.html#string_lambda