From: ······@gmail.com
Subject: Questions - Higer Order Functions
Date: 
Message-ID: <5720d679-5b56-46c3-ad11-d1ebbd249a0f@t54g2000hsg.googlegroups.com>
1. Is a higher order function:
a) a function that can take as a parameter another function
b) a function that returns a function
c) both?
2. In practice, are functions that return functions used frequently?

From: Slobodan Blazeski
Subject: Re: Questions - Higer Order Functions
Date: 
Message-ID: <751ed4ba-fda0-4d11-b54a-45674b995aca@r66g2000hsg.googlegroups.com>
On Apr 30, 7:19 am, ·······@gmail.com" <······@gmail.com> wrote:
> 1. Is a higher order function:
> a) a function that can take as a parameter another function
> b) a function that returns a function
> c) both?
http://www.justfuckinggoogleit.com/search.pl?query=Higher+order+function
http://en.wikipedia.org/wiki/Higher-order_function
> 2. In practice, are functions that return functions used frequently?
In languages that support them  like lisp , joy, j, haskell etc. yes
they are.
else no.
From: Ken Tilton
Subject: Re: Questions - Higer Order Functions
Date: 
Message-ID: <48184d6b$0$11618$607ed4bc@cv.net>
Is there a JFWI page?

   http://en.wikipedia.org/wiki/Higher-order_function

kt

······@gmail.com wrote:
> 1. Is a higher order function:
> a) a function that can take as a parameter another function
> b) a function that returns a function
> c) both?
> 2. In practice, are functions that return functions used frequently?

-- 
http://smuglispweeny.blogspot.com/
http://www.theoryyalgebra.com/

"I've never read the rulebook. My job is to catch the ball."
   -- Catcher Josh Bard after making a great catch on a foul ball
and then sliding into the dugout, which by the rules allowed the
runners to advance one base costing his pitcher a possible shutout
because there was a runner on third base.

"My sig is longer than most of my articles."
   -- Kenny Tilton
From: Rainer Joswig
Subject: Re: Questions - Higer Order Functions
Date: 
Message-ID: <joswig-3846CC.08545630042008@news-europe.giganews.com>
In article 
<····································@t54g2000hsg.googlegroups.com>,
 ·······@gmail.com" <······@gmail.com> wrote:

> 1. Is a higher order function:
> a) a function that can take as a parameter another function
> b) a function that returns a function
> c) both?
> 2. In practice, are functions that return functions used frequently?

Is that homework?

-- 
http://lispm.dyndns.org/
From: Kent M Pitman
Subject: Re: Questions - Higer Order Functions
Date: 
Message-ID: <ufxt3vhpb.fsf@nhplace.com>
Rainer Joswig <······@lisp.de> writes:

> In article 
> <····································@t54g2000hsg.googlegroups.com>,
>  ·······@gmail.com" <······@gmail.com> wrote:
> 
> > 1. Is a higher order function:
> > a) a function that can take as a parameter another function
> > b) a function that returns a function
> > c) both?
> > 2. In practice, are functions that return functions used frequently?
> 
> Is that homework?

Is a higher order question:
a) a question that can take as a parameter another question
b) a question that returns a question
c) both?
2. In practice, are questions that return questions used frequently?

;)
From: Didier Verna
Subject: Re: Questions - Higer Order Functions
Date: 
Message-ID: <mux4p9jlmm9.fsf@uzeb.lrde.epita.fr>
Kent M Pitman <······@nhplace.com> wrote:

> Is a higher order question:
> a) a question that can take as a parameter another question
> b) a question that returns a question
> c) both?
> 2. In practice, are questions that return questions used frequently?

  I believe the most important aspect of higher order questions is
lambda-questions: anonymous questions that stand for themselves...

-- 
5th European Lisp Workshop at ECOOP 2008, July 7: http://elw.bknr.net/2008/

Didier Verna, ······@lrde.epita.fr, http://www.lrde.epita.fr/~didier

EPITA / LRDE, 14-16 rue Voltaire   Tel.+33 (0)1 44 08 01 85
94276 Le Kremlin-Bic�tre, France   Fax.+33 (0)1 53 14 59 22  ······@xemacs.org
From: Slobodan Blazeski
Subject: Re: Questions - Higer Order Functions
Date: 
Message-ID: <acec1fc3-4a32-4a22-a5c9-05bf4cf2a0ba@a70g2000hsh.googlegroups.com>
On Apr 30, 11:26 am, Didier Verna <······@lrde.epita.fr> wrote:
> Kent M Pitman <······@nhplace.com> wrote:
>
> > Is a higher order question:
> > a) a question that can take as a parameter another question
> > b) a question that returns a question
> > c) both?
> > 2. In practice, are questions that return questions used frequently?
>
>   I believe the most important aspect of higher order questions is
> lambda-questions: anonymous questions that stand for themselves...

Anonymous functions are very important but you don't need lambda to
make anonymous functions, take look at joy
http://www.latrobe.edu.au/philosophy/phimvt/joy.html
It works with combinators and it's power of function manipulation is
extreme.
Or j http://www.jsoftware.com/  though it looks like vomit has great
function facilities.
Beside you can gracefully get rid of most of the loops just by
function manipulation.

>
> --
> 5th European Lisp Workshop at ECOOP 2008, July 7:http://elw.bknr.net/2008/
>
> Didier Verna, ······@lrde.epita.fr,http://www.lrde.epita.fr/~didier
>
> EPITA / LRDE, 14-16 rue Voltaire   Tel.            +33 (0)1 44 08 01 85       
> 94276 Le Kremlin-Bicêtre, France   Fax.+33 (0)1 53 14 59 22  ······@xemacs.org
From: Duane Rettig
Subject: Re: Questions - Higer Order Functions
Date: 
Message-ID: <o0skx376e6.fsf@gemini.franz.com>
Didier Verna <······@lrde.epita.fr> writes:

> Kent M Pitman <······@nhplace.com> wrote:
>
>> Is a higher order question:
>> a) a question that can take as a parameter another question
>> b) a question that returns a question
>> c) both?
>> 2. In practice, are questions that return questions used frequently?
>
>   I believe the most important aspect of higher order questions is
> lambda-questions: anonymous questions that stand for themselves...

We definitely need a meta-question protocol.

-- 
Duane Rettig    ·····@franz.com    Franz Inc.  http://www.franz.com/
555 12th St., Suite 1450               http://www.555citycenter.com/
Oakland, Ca. 94607        Phone: (510) 452-2000; Fax: (510) 452-0182   
From: Didier Verna
Subject: Re: Questions - Higer Order Functions
Date: 
Message-ID: <muxmynbjohj.fsf@uzeb.lrde.epita.fr>
Duane Rettig wrote:

> Didier Verna <······@lrde.epita.fr> writes:
>
>>   I believe the most important aspect of higher order questions is
>> lambda-questions: anonymous questions that stand for themselves...
>
> We definitely need a meta-question protocol.

  How do you pronounce that ? I mean, MQP ? :-)

-- 
5th European Lisp Workshop at ECOOP 2008, July 7: http://elw.bknr.net/2008/

Didier Verna, ······@lrde.epita.fr, http://www.lrde.epita.fr/~didier

EPITA / LRDE, 14-16 rue Voltaire   Tel.+33 (0)1 44 08 01 85
94276 Le Kremlin-Bic�tre, France   Fax.+33 (0)1 53 14 59 22  ······@xemacs.org
From: Thomas A. Russ
Subject: Re: Questions - Higer Order Functions
Date: 
Message-ID: <ymi4p9jujk6.fsf@blackcat.isi.edu>
Didier Verna <······@lrde.epita.fr> writes:

> Duane Rettig wrote:
> > We definitely need a meta-question protocol.
> 
>   How do you pronounce that ? I mean, MQP ? :-)

In English I would try "emquip".

-- 
Thomas A. Russ,  USC/Information Sciences Institute
From: Paul Donnelly
Subject: Re: Questions - Higer Order Functions
Date: 
Message-ID: <87d4o7c88l.fsf@plap.localdomain>
···@sevak.isi.edu (Thomas A. Russ) writes:

> Didier Verna <······@lrde.epita.fr> writes:
>
>> Duane Rettig wrote:
>> > We definitely need a meta-question protocol.
>> 
>>   How do you pronounce that ? I mean, MQP ? :-)
>
> In English I would try "emquip".

Not "muckp"?
From: Robert Maas, http://tinyurl.com/uh3t
Subject: Re: Questions - Higer Order Functions
Date: 
Message-ID: <rem-2008may04-001@yahoo.com>
> From: Duane Rettig <·····@franz.com>
> We definitely need a meta-question protocol.

I propose the following protocol. Anyone who posts a question which
is obviously their homework, on which they have done no work
whatsoever, and are expecting one or more volunteers in the
newsgroup to do the work for him/her, should be waterboarded until
he/she confesses that this isn't the first time he/she has tried to
cheat in school by getting others to do his/her homework for
him/her. After that initial confession, he/she should be
waterboarded as much as necessary to get him/her to elaborate the
confession with a detailed history of all such cheating in school.

Who needs terrorists trying to destroy our country, when some of
our own students cheat their way to a degree then use that degree
to get jobs for which they are totally unqualified then make
mistakes so gross that millions of people are killed by those
mistakes?

Can anybody use the IP number of the OP to track him/her down to
use him/her as an "example" to deter others from trying to cheat?

BTW, in CMUCL:
(funcall #'(lambda (x) (list 'funcall x x))
         #'(lambda (x) (list 'funcall x x)))
==>
(FUNCALL #<Interpreted Function (LAMBDA (X) (LIST 'FUNCALL X X)) {9016661}>
         #<Interpreted Function (LAMBDA (X) (LIST 'FUNCALL X X)) {9016661}>)
which is then a fixed point of EVAL.
With *print-circle* true, the fixed point prints as:
(FUNCALL #1=#<Interpreted Function (LAMBDA (X) (LIST 'FUNCALL X X)) {9016661}>
         #1#)
The hexadecimal machine address of course varies with circumstances.
Disclaimer: This is the first time I've done this on my own, namely
passing a function to itself in such a way that the return value is
an expression for passing the same function to itself again, the
expression for such passing being the fixed point of EVAL.
Riddle: Is it really fun to call a function with itself as
parameter such that the return value is an expression which
evaluates to that same function being called with itself as a
parameter again?
Hmm, I suppose I really should minimize the amount of text repeated:
(let ((fun #'(lambda (x) (list 'funcall x x))))
  (funcall fun fun))
Is it more fun that way?
What was that motto somebody posted recently about saying each thing just once?
I tried to find it by Google search but it didn't turn up.
From: Rob Warnock
Subject: Re: Questions - Higer Order Functions
Date: 
Message-ID: <erOdnW1u69fXObzVnZ2dnUVZ_oCvnZ2d@speakeasy.net>
Robert Maas, <·················@SpamGourmet.Com> wrote:
+---------------
| > From: Duane Rettig <·····@franz.com>
| > We definitely need a meta-question protocol.
| 
| I propose the following protocol. Anyone who posts a question which
| is obviously their homework, on which they have done no work
| whatsoever, and are expecting one or more volunteers in the
| newsgroup to do the work for him/her, should be waterboarded until
| he/she confesses that this isn't the first time he/she has tried to
| cheat in school by getting others to do his/her homework for him/her.
+---------------

I prefer the protocol practiced over in "comp.arch", which is that,
upon detecting such an obviously blatent homework question, the
regular denizens of the newsgroup vie for seeing who can construct
the most plausable-sounding answer which is nevertheless complete
nonsense. Said another way, "trying to give as wrong answer as
possible while making it in such subtle ways that you might even
use it." [Jouni Osmala, Sept. 2002.] Extra points are given for
the answer being hilariously funny to insiders. 


-Rob

-----
Rob Warnock			<····@rpw3.org>
627 26th Avenue			<URL:http://rpw3.org/>
San Mateo, CA 94403		(650)572-2607
From: Thomas A. Russ
Subject: Re: Questions - Higer Order Functions
Date: 
Message-ID: <ymiprry9jk4.fsf@blackcat.isi.edu>
····@rpw3.org (Rob Warnock) writes:

> Robert Maas, <·················@SpamGourmet.Com> wrote:
> +---------------
> | > From: Duane Rettig <·····@franz.com>
> | > We definitely need a meta-question protocol.
> | 
> | I propose the following protocol. Anyone who posts a question which
> | is obviously their homework, on which they have done no work
> | whatsoever, and are expecting one or more volunteers in the
> | newsgroup to do the work for him/her, should be waterboarded until
> | he/she confesses that this isn't the first time he/she has tried to
> | cheat in school by getting others to do his/her homework for him/her.
> +---------------
> 
> I prefer the protocol practiced over in "comp.arch", which is that,
> upon detecting such an obviously blatent homework question, the
> regular denizens of the newsgroup vie for seeing who can construct
> the most plausable-sounding answer which is nevertheless complete
> nonsense. Said another way, "trying to give as wrong answer as
> possible while making it in such subtle ways that you might even
> use it." [Jouni Osmala, Sept. 2002.] Extra points are given for
> the answer being hilariously funny to insiders. 

I have certainly seen variants of that method used here, but with an
interestingly subtle twist:  The solutions are actually correct.  But so
convoluted or making use of more advanced CL features than one expects
the poster to know about.

I recall seeing some amazing use of higher order functions to solve some
of these homework assignments.  The code works great, solves the problem
and is still impossible to submit as one's own work.

-- 
Thomas A. Russ,  USC/Information Sciences Institute
From: Kent M Pitman
Subject: Re: Questions - Higer Order Functions
Date: 
Message-ID: <ubq3rv3mv.fsf@nhplace.com>
Didier Verna <······@lrde.epita.fr> writes:

> Kent M Pitman <······@nhplace.com> wrote:
> 
> > Is a higher order question:
> > a) a question that can take as a parameter another question
> > b) a question that returns a question
> > c) both?
> > 2. In practice, are questions that return questions used frequently?
> 
>   I believe the most important aspect of higher order questions is
> lambda-questions: anonymous questions that stand for themselves...

Perhaps these are related to the famous "why?" operators I've heard so 
much about.
From: Thomas A. Russ
Subject: Re: Questions - Higer Order Functions
Date: 
Message-ID: <ymiprs7cn5m.fsf@blackcat.isi.edu>
Kent M Pitman <······@nhplace.com> writes:

> Didier Verna <······@lrde.epita.fr> writes:
> 
> > Kent M Pitman <······@nhplace.com> wrote:
> > 
> > > Is a higher order question:
> > > a) a question that can take as a parameter another question
> > > b) a question that returns a question
> > > c) both?
> > > 2. In practice, are questions that return questions used frequently?
> > 
> >   I believe the most important aspect of higher order questions is
> > lambda-questions: anonymous questions that stand for themselves...
> 
> Perhaps these are related to the famous "why?" operators I've heard so 
> much about.

Of course, our research here a few years back looked at implementing the
WHY-NOT operator as well[1].


[1] <http://www.isi.edu/~hans/publications/IAAI02.pdf>

-- 
Thomas A. Russ,  USC/Information Sciences Institute
From: Harald Hanche-Olsen
Subject: Re: Questions - Higer Order Functions
Date: 
Message-ID: <pcoskx346vm.fsf@shuttle.math.ntnu.no>
+ Kent M Pitman <······@nhplace.com>:

> Didier Verna <······@lrde.epita.fr> writes:
>
>> Kent M Pitman <······@nhplace.com> wrote:
>> 
>> > Is a higher order question:
>> > a) a question that can take as a parameter another question
>> > b) a question that returns a question
>> > c) both?
>> > 2. In practice, are questions that return questions used frequently?
>> 
>>   I believe the most important aspect of higher order questions is
>> lambda-questions: anonymous questions that stand for themselves...
>
> Perhaps these are related to the famous "why?" operators I've heard so 
> much about.

That is used if you wish to ask a question that asks a question about
itself, I think. The pertinent fact is surely the equation

  question why? question == why? question

-- 
* Harald Hanche-Olsen     <URL:http://www.math.ntnu.no/~hanche/>
- It is undesirable to believe a proposition
  when there is no ground whatsoever for supposing it is true.
  -- Bertrand Russell
From: Steven M. Haflich
Subject: Re: Questions - Higer Order Functions
Date: 
Message-ID: <uwuSj.609$17.25@newssvr22.news.prodigy.net>
Kent M Pitman wrote:
> Didier Verna <······@lrde.epita.fr> writes:
> 
>> Kent M Pitman <······@nhplace.com> wrote:
>>
>>> Is a higher order question:
>>> a) a question that can take as a parameter another question
>>> b) a question that returns a question
>>> c) both?
>>> 2. In practice, are questions that return questions used frequently?
>>   I believe the most important aspect of higher order questions is
>> lambda-questions: anonymous questions that stand for themselves...
> 
> Perhaps these are related to the famous "why?" operators I've heard so 
> much about.

Since functions are first-class objects, are there operators that
can raise or lower the order of a function?  If so, do those functions
return the _same_ (as in eq) function, or a new derivative of the
function?

Disfunctional minds want to know!
From: Slobodan Blazeski
Subject: Is there any operator that could raise or lower order of function
Date: 
Message-ID: <5106087a-f15b-4a84-9e4c-c3ac701a55c5@e53g2000hsa.googlegroups.com>
On May 2, 3:55 am, "Steven M. Haflich" <····@alum.mit.edu> wrote:
> Kent M Pitman wrote:
> > Didier Verna <······@lrde.epita.fr> writes:
>
> >> Kent M Pitman <······@nhplace.com> wrote:
>
> >>> Is a higher order question:
> >>> a) a question that can take as a parameter another question
> >>> b) a question that returns a question
> >>> c) both?
> >>> 2. In practice, are questions that return questions used frequently?
> >>   I believe the most important aspect of higher order questions is
> >> lambda-questions: anonymous questions that stand for themselves...
>
> > Perhaps these are related to the famous "why?" operators I've heard so
> > much about.
>
> Since functions are first-class objects, are there operators that
> can raise or lower the order of a function?  If so, do those functions
> return the _same_ (as in eq) function, or a new derivative of the
> function?
>
> Disfunctional minds want to know!

What would mean to raise the order of a function?
We have only stadard function and higher order function.
In j you usually play with rank of a function, that returns a new
function , or you can curry uncarry them,
but in order to make an ordinary function into a higher order one I
really don't have a clue.
Could anybody explain this?


Slobodan
From: Kaz Kylheku
Subject: Re: Is there any operator that could raise or lower order of function
Date: 
Message-ID: <1f3a13d2-d1d7-4033-88e5-3a3428fdf09b@f24g2000prh.googlegroups.com>
On May 2, 12:05 am, Slobodan Blazeski <·················@gmail.com>
wrote:
> On May 2, 3:55 am, "Steven M. Haflich" <····@alum.mit.edu> wrote:
> > Disfunctional minds want to know!
>
> What would mean to raise the order of a function?
> We have only stadard function and higher order function.

Order is perhaps the number of levels of indirection you must
dereference to actually call a function which just returns or accepts
a plain datum.

Lambda increases order, funcall decreases.

;; fourth order function:

(defvar *fourth-order*
        (lambda () (lambda () (lambda () (lambda () '("hello"
"world"))))))

;; get the damn data out:

(funcall (funcall (funcall (funcall *fourth-order*)))) -> ("hello"
"world")

And, ladies and gentlemen, we call this  ``making a few funcalls to
pull a few strings''.

> but in order to make an ordinary function into a higher order one I
> really don't have a clue.

Turn something into something else? Eww, that reeks of destructive
manipulation. :)

A higher order function simply ... is.
From: Slobodan Blazeski
Subject: Re: Is there any operator that could raise or lower order of function
Date: 
Message-ID: <7d05cfc0-b7cf-4c05-9c61-1865cea34767@i76g2000hsf.googlegroups.com>
On May 2, 9:24 am, Kaz Kylheku <········@gmail.com> wrote:
> On May 2, 12:05 am, Slobodan Blazeski <·················@gmail.com>
> wrote:
>
> > On May 2, 3:55 am, "Steven M. Haflich" <····@alum.mit.edu> wrote:
> > > Disfunctional minds want to know!
>
> > What would mean to raise the order of a function?
> > We have only stadard function and higher order function.
>
> Order is perhaps the number of levels of indirection you must
> dereference to actually call a function which just returns or accepts
> a plain datum.
>
> Lambda increases order, funcall decreases.
>
> ;; fourth order function:
>
> (defvar *fourth-order*
>         (lambda () (lambda () (lambda () (lambda () '("hello"
> "world"))))))
>
> ;; get the damn data out:
>
> (funcall (funcall (funcall (funcall *fourth-order*)))) -> ("hello"
> "world")
>
> And, ladies and gentlemen, we call this  ``making a few funcalls to
> pull a few strings''.
I don't know where such thing would be useful. Or is there any real
life analogy about it.
For example FBP has some analigy for the asynchronious of the
recepies.
Like:  Put a water to boil for twenty minutes.
It means you could do something else while the water is boiling.

Actually according to definition higher-order functions or functionals
are functions which do at least one of the following:

1. take one or more functions as an input
2. output a function

so there decresing order of a function to a plain one means:
1. To make a function that doesn't accept functions as input,
(lambda (fn x) (reduce fn x))
2. Output a function:
(defun make-adder (n)
   #'(lambda (x) (+ x n)))

How would you decrease order of above, or construct new objects with
decreased order of them , and still keep sense?





>
> > but in order to make an ordinary function into a higher order one I
> > really don't have a clue.
>
> Turn something into something else? Eww, that reeks of destructive
> manipulation. :)
Create something from something else, like in j would be probably
better .
>
> A higher order function simply ... is.
From: Chris Russell
Subject: Re: Is there any operator that could raise or lower order of function
Date: 
Message-ID: <90db0add-21c9-4108-ad74-e4c9ecc358df@k37g2000hsf.googlegroups.com>
On May 2, 10:49 am, Slobodan Blazeski <·················@gmail.com>
wrote:

> I don't know where such thing would be useful. Or is there any real
> life analogy about it.
Practically, maybe something like this could turn up in real code:

(defun raise (init-fn val)
 (lambda (helper-fn & rest rest)
          (apply init-fn (funcall helper-fn val) rest)))

It raises the order of the function, where order is defined as, "the
number of functions it takes as an input."

Alternatively, I was playing with functional iterators in scheme
recently and you can define an iterator-fn as something that returns
its value, and the next iterator-fn in the sequence or nil if it's at
the end of the sequence.

In this case, pushing additional iterators on the front of an existing
iterator raises its order, where order is, like Kaz's definition, the
number of times you have to call a return value before it stops
returning a function.
From: ········@ps.uni-sb.de
Subject: Re: Is there any operator that could raise or lower order of function
Date: 
Message-ID: <8e8edde7-43e3-4adf-8a9d-a66109131adc@e39g2000hsf.googlegroups.com>
On May 2, 9:24 am, Kaz Kylheku <········@gmail.com> wrote:
>
> Order is perhaps the number of levels of indirection you must
> dereference to actually call a function which just returns or accepts
> a plain datum.
>
> Lambda increases order, funcall decreases.
>
> ;; fourth order function:
>
> (defvar *fourth-order*
>         (lambda () (lambda () (lambda () (lambda () '("hello"
> "world"))))))

Usually, order is the nesting depth of functional _arguments_. The
notion is easy to understand when you look at types. Say you have a
language that has only functions, tuples, and int. Then the standard
definition of order would:

  order(int)    = 0
  order(t1*t2)  = max(order(t1), order(t2))
  order(t1->t2) = max(order(t1)+1, order(t2))

That is, a function of type int->int is first-order, while ((int->int)-
>int)->int is third-order. Note however that your example would have a
type like A->(B->(C->(D->E))), and thus actually is a first-order
function - at least according to the standard definition in logic. The
reason for this definition is that via (un)currying this type actually
is isomorphic to A*B*C*D->E, which clearly is first-order. So
_returning_ a function does not raise order, unless that function is
higher-order itself. Plain curried functions are still first-order.

- Andreas
From: Robert Maas, http://tinyurl.com/uh3t
Subject: Re: Is there any operator that could raise or lower order of function
Date: 
Message-ID: <rem-2008may04-003@yahoo.com>
> From: Kaz Kylheku <········@gmail.com>
> Order is perhaps the number of levels of indirection you must
> dereference to actually call a function which just returns or
> accepts a plain datum.

I hate the word "dereference".
Otherwise I'd nominate that for the koan collection.

> Lambda increases order, funcall decreases.

That's much more compact than what I posted a few minutes ago.
I nominate this for the koan collection.

> And, ladies and gentlemen, we call this  ``making a few funcalls
> to pull a few strings''.

Oh no, the start of a pun cascade! Should I call the puncall squad?

> Turn something into something else?
> Eww, that reeks of destructive manipulation. :)

It'll take that N.A.I.L. reeks to figure out these puns.

> A higher order function simply ... is.

Um, can you please say that in E-prime?

That that is, is.
That that is not, is not.
That that is is not that that is not.
That that is not is not that that is.
Quick, did I quote from "Macroscope" or "The Great Time-Machine Hoax"?
From: Robert Maas, http://tinyurl.com/uh3t
Subject: Re: Is there any operator that could raise or lower order of function
Date: 
Message-ID: <rem-2008may04-002@yahoo.com>
To: rigaha at gmail dot com, posting from IP number 128.61.122.197
 hence presumably a student at the Georgia Institute of Technology:
 You are forbidden to read this reply, because you are a potential
 terrorist and I don't want to help any potential terrorist with
 homework and thereby possibly help a future terrorist get a degree
 that isn't deserved and thereby help a terrorist get a job at an
 important facility that affects millions of lives. Please post the
 name and e-mail address of your instructor who assigned that
 homework, OK?
Everyone else feel free to continue reading:

> From: Slobodan Blazeski <·················@gmail.com>
> What would [it] mean to raise the order of a function?

It's not possible to change anything, because the result is not the
same thing as what you had before. For example, if you add 1 to a
number, you have a different number, not the original number "changed".

> In j you usually play with rank of a function, that returns a new
> function, or you can curry uncarry them, but in order to make an
> ordinary function into a higher order one I really don't have a
> clue.

This is not especially interesting, but given a function you can
create a no-arg function that returns the original function:
Here's a factory that does that:
  (lambda (fun) #'(lambda () fun))
And given a no-arg function that returns a function, it's trivial
to use FUNCALL or APPLY with no args to get that return value
function. Here are respective customers of the factory:
  (lambda (noargfun) (funcall noargfun))
  (lambda (noargfun) (apply noargfun NIL))
Of course that code is completely general. You don't have to pass a
function to that original factory, anything will work just the same
to create a no-arg function that returns whatever you passed to the
factory.

Hmm, this is a perverse case where the factory is smaller than the
customer, but I guess using the #' reader-macro is cheating. The
factory should have been written as:
  (lambda (fun) (function (lambda () fun)))
Then the factory is larger than either of its customers, as it should be.

Putting both facts together:
(lambda (fun) (function (lambda () fun)))
=> #<Interpreted Function (LAMBDA (FUN) #'(LAMBDA () FUN)) {9031769}>
(funcall * 42)
=> #<Interpreted Function "LAMBDA (FUN)" {9036A89}>
(funcall *)
=> 42

Hmm, Rainer Joswig asked if the OP was asking for help with
homework, then KMP really hit the N.A.I.L. on the head when he
replied with a meta-riddle in the form of a paraphrase of the
original posting. But I've been at a loss to make up an appropriate
phrase with that abbreviation, until now:
  Noticeably Awful Instructional Luser, i.e. Bad Student.

After I came up with that, it occurred to me to look here:
<http://www.acronymattic.com/results.aspx?q=NAIL>
But the closest I could find was:
  New Adventure in Learning
So I think I've genuinely coined a new kind of NAIL, which is
a lot better than re-inventing the same old wheel!  :-)

So, just like we say <plonk> or Troll alert! in response to certain
kinds of Original Postings, maybe now we can simply reply N.A.I.L.
any time we spot somebody asking us to do his/her homework for him/her?
From: Pascal J. Bourguignon
Subject: Re: Questions - Higer Order Functions
Date: 
Message-ID: <7cbq3o22s5.fsf@pbourguignon.anevia.com>
"Steven M. Haflich" <···@alum.mit.edu> writes:

> Kent M Pitman wrote:
>> Didier Verna <······@lrde.epita.fr> writes:
>> 
>>> Kent M Pitman <······@nhplace.com> wrote:
>>>
>>>> Is a higher order question:
>>>> a) a question that can take as a parameter another question
>>>> b) a question that returns a question
>>>> c) both?
>>>> 2. In practice, are questions that return questions used frequently?
>>>   I believe the most important aspect of higher order questions is
>>> lambda-questions: anonymous questions that stand for themselves...
>> Perhaps these are related to the famous "why?" operators I've heard
>> so much about.
>
> Since functions are first-class objects, are there operators that
> can raise or lower the order of a function?  

Of course,  you can make up some of them.

(defun lower (f x) (funcall f x))

(defun high-order-function (x) (lambda (y) (+ y x)))
;; This function is high order since it takes a function as argument
;; and return a function as result.

(lower (function high-order-function) 3)
;; This function is one order less than high-order-function since it 
;; only takes a number as argument and return a number.

(funcall (lower (function high-order-function) 3) 2) --> 5


(defun raise (f)
   (lambda (g)
      (if (= (funcall g 0) (funcall f 0)) 
        (lambda (h) (lambda (x) (funcall h (funcall g (funcall f x)))))
        (lambda (h) (lambda (x) (funcall h (funcall f (funcall g x))))))))

(raise (lambda (x) (* 2 x)))
;; is a function  of higher order than double. It takes a function, and returns another function:
#<FUNCTION :LAMBDA (G) (IF (= (FUNCALL G 0) (FUNCALL F 0)) (LAMBDA (H) (LAMBDA (X) (FUNCALL H (FUNCALL G (FUNCALL F X))))) (LAMBDA (H) (LAMBDA (X) (FUNCALL H (FUNCALL F (FUNCALL G X))))))>


C/USER[145]> (funcall (funcall (raise (lambda (x) (* 2 x)))  (lambda (x) (1+ (expt x 3)))) (function identity))
#<FUNCTION :LAMBDA (X) (FUNCALL H (FUNCALL F (FUNCALL G X)))>
C/USER[146]> (funcall (funcall (raise (lambda (x) (* 2 x)))  (lambda (x) (expt x 3))) (function identity))
#<FUNCTION :LAMBDA (X) (FUNCALL H (FUNCALL G (FUNCALL F X)))>


> If so, do those functions
> return the _same_ (as in eq) function, or a new derivative of the
> function?

In Common Lisp (and in scheme), in general, 
(not (eq  (funcall (curry (function high-order-function) 3))
          (funcall (curry (function high-order-function) 3))))
but this is implementation dependant.


> Disfunctional minds want to know!

-- 
__Pascal Bourguignon__
From: Thomas A. Russ
Subject: Re: Questions - Higer Order Functions
Date: 
Message-ID: <ymilk2vcmy4.fsf@blackcat.isi.edu>
·······@gmail.com" <······@gmail.com> writes:

> 2. In practice, are functions that return functions used frequently?

Well, this one of course depends on what you are doing.  Some
applications find it very helpful to write functions that return other
functions.  Loom <http://www.isi.edu/isd/LOOM/> make great use of this
in order to very efficiently compute what were in effect queries by
constructing a program that executed an optimized search over its
knowledge base.  In the case of certain defined concepts and relations,
those queries were compiled and stored as compiled functions for future
use.

This also allowed for easy implmentation of a general query facility as
a macro, since a macro can be seen as embodying a function that returns
a function.

-- 
Thomas A. Russ,  USC/Information Sciences Institute