Totaram Sanadhya

2012-10-30 23:40:02 UTC

Hi,

My main functional language is emacs based lisp.

I am not exactly clear about the associativity.

On the one hand the elements of a list such as (a b c d) are right

associative

(cons 'a (cons 'b (cons 'c (cons 'd nil)))) C-x C-e

==> (a b c d)

On the other hand a curried function such as (f x y z) is left

associative by definition

(...(f x) y) z)

How do you resolve this paradox?

Swami

My main functional language is emacs based lisp.

I am not exactly clear about the associativity.

On the one hand the elements of a list such as (a b c d) are right

associative

(cons 'a (cons 'b (cons 'c (cons 'd nil)))) C-x C-e

==> (a b c d)

On the other hand a curried function such as (f x y z) is left

associative by definition

(...(f x) y) z)

How do you resolve this paradox?

Swami