[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Most awesome string metatable hack
- From: Coda Highland <chighland@...>
- Date: Sat, 1 Feb 2014 09:55:18 -0800
On Sat, Feb 1, 2014 at 4:53 AM, Roberto Ierusalimschy
<roberto@inf.puc-rio.br> wrote:
>> 1. In mathematics, function composition is right-associative.
>
> In mathematics, function composition is associative, so it is mostly
> a detail whether it is implemented as right- or left-associative;
> the final result is the same.
>
> -- Roberto
>
The mathematical notation (f o g)(x) specifically means f(g(x)),
however, and function composition isn't commutative. Since the concat
hack should reproduce this behavior to be consistent with standard
notation, the conclusion is correct even though the supporting premise
was off-topic.
/s/ Adam