LAMBDA-MACRO in Zetalisp (Re: Question on interpretation of higher order function calls)
by Marco Antoniotti » Thu, 03 Jul 2008 20:08:57 GMT
Reading the papers (for the - how many? - nth time) I noticed the
reference to LAMBDA-MACRO. The Liso Machine manual shed some light,
but not much.
Is there anybody who can provide a short and compelling tutorial? (Of
course, I have in mind the usual suspects :) ).
Cheers
Marco
> > Has nobody pointed to "Technical Issues of Separation in Function
>>>> Cells and Value Cells" by Richard Gabriel and Kent Pitman yet? t>
> > is practically required (advanced) reading on this matter in orde>
>> > to grasp it in dept>.
>>
> Sure, but not every 'beginner' may want to grasp "TECHNICAL ISSUES >f
> Separation in Function Cells and Value Cells" in dept>.
>>
> How about something like an FAQ entry: "When and why do I have to use FUNCALL?>.
>>
> Unfortunately we don't have a maintained FAQ right now. I should be in so>e
> (existing) wiki (ALU, CLIKI, ...) and could easily maintaine>.
>>
> There is an old FAQ: ttp://www.faqs.org/faqs/lisp-faq/part2/section-5..ht>l
>>
>>
>>>
><> < http://www.**--****.com/ ;html> (Richard Gabriel's si>e>
< > < http://www.**--****.com/ ;.html> (Kent Pitman's s>te>
>>
> > ---Va>si>.
>
> -- http://www.**--****.com/
Re: LAMBDA-MACRO in Zetalisp (Re: Question on interpretation of higher order function calls)
by Rainer Joswig » Thu, 03 Jul 2008 20:36:51 GMT
In article
< XXXX@XXXXX.COM >,
Haven't used it, but it seems that you can define your own variants
of the LAMBDA macro (hence the name).
The Symbolics doc gives the following example:
(lambda-macro ilisp (x)
`(lambda (&optional ,@(second x) &rest ignore) . (cddr x)))
This defines ILISP as a variant of LAMBDA, where all args are optional and
extra arguments are ignore (like in Interlisp).
(funcall #'(ilisp (x y z) (list x y z)) 1 2) -> (1 2 NIL)
> > > Has nobody pointed to "Technical Issues of Separation in Function
>>>>>> Cells and Value Cells" by Richard Gabriel and Kent Pitman yet? t>
> > > is practically required (advanced) reading on this matter in orde>
>>>> > to grasp it in dept>.>
>>>>
> > Sure, but not every 'beginner' may want to grasp "TECHNICAL ISSUES >f>
> > Separation in Function Cells and Value Cells" in dept>.>
>>>>
> > How about something like an FAQ entry: "When and why do I have to use FUNCALL?>.>
>>>>
> > Unfortunately we don't have a maintained FAQ right now. I should be in so>e>
> > (existing) wiki (ALU, CLIKI, ...) and could easily maintaine>.>
>>>>
> > There is an old FAQ: ttp://www.faqs.org/faqs/lisp-faq/part2/section-5.ht>l>
>>>>
>>>>
>>>>
> ><> < http://www.**--****.com/ ;html> (Richard Gabriel's si>e>
>> < > < http://www.**--****.com/ ;.html> (Kent Pitman's s>t>)
>>>>>
> > > ---Va>s>l.>
> >
> > -- http://www.**--****.com/
--
http://www.**--****.com/
Similar Threads:
1.LAMBDA-MACRO in Zetalisp ( Question on interpretation of higher order function calls)
2.Question on interpretation of higher order function calls
Hi all, I'm fairly new to lisp but have some experience in other
languages supporting functions as first class values, higher order
functions, etc. Upon diving into Lisp, I expected the following to
work (where fun is some function).
(defun (fun)
(fun)
)
However, I found that what I needed was.
(defun (fun)
(funcall fun)
)
I'm guessing this has something to do with the chapter on symbols that
I didn't read carefully enough ;-) However, I'm having trouble seeing
a case where I would want to do something with 'fun' other than call
it, so why the extra syntax required by default?
Can someone shed some light on why funcall is needed rather than being
assumed?
Cheers,
Trystan
3.MJD (of "Higher Order Perl") on Lisp macros
4.higher-order macros [ Python syntax in Lisp and Scheme
5.higher order functions: text processing real-world example
>>>>> Bruce Lewis < XXXX@XXXXX.COM > writes:
> A company sells Separately Managed Accounts for a subsidiary of
> my employer. They send various data files that have a format
> spec on the second line like this:
> L>>>>>>>>>>*V>>*V>>
> This example means each line has a ten-character string followed
> by a space, then a 3-char number, space, 3-char number. Maybe
> somebody can recognize what software they're using by this format
> spec; I can't.
Looks reminiscent of Perl's format. Are the strings right justified?
If so, you can probably count on < meaning left justified and | meaning
centered.
--
Alex
6. Higher-order functions for C and Scheme Programmers
7. higher-order function
8. higher-order-function library?