On Oct 31, 1:14 am, Barb Knox <s...@sig.below> wrote:
> In article
> <
9972e570-2504-4401-8de8-49eb1929f...@c17g2000yqe.googlegroups.com>,
> Totaram Sanadhya <
swami.totaram.sanad...@gmail.com> wrote:
>
> > 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?
>
> Easily: Lisp does not use curried functions.
Which programming languages use curried functions?
I have often heard people like Kastrup talk of
curried functions in gnu.emacs.help and they
even give some code like
((lambda(g n) (funcall g g n))
(lambda(f n)
(if (zerop n) 1
(* n (funcall f f (1- n)))))
4 )
Is there some kind of hack by which I could come close to it in emacs
lisp?
I would have gladly put a backtrace or execution trace for you, but I
could not find a single function that gives an output like the
detailed backtrace when there is an execution error. Perhaps, someone
who is more knowledgeable can take this as an _aside_ question.
However, before I end my post, I just want to thank both Barb and
especially Nils for his student-friendly writings, and the wonderful
books he has written.
Swami
P.S. Unfortunately, I have to crosspost as this is relevant in many
groups, so please avoid or ignore any flames or derailing attempts.