On May 2, 9:24=A0am, Kaz Kylheku <kkylh...@[EMAIL PROTECTED]
> wrote:
> On May 2, 12:05=A0am, Slobodan Blazeski <slobodan.blaze...@[EMAIL PROTECTED]
>
> wrote:
>
> > On May 2, 3:55=A0am, "Steven M. Haflich" <s...@[EMAIL PROTECTED]
> 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*
> =A0 =A0 =A0 =A0 (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 =A0``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.


|