Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Functional > Re: Is there an...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 2832 of 2841
Post > Topic >>

Re: Is there any operator that could raise or lower order of function

by Slobodan Blazeski <slobodan.blazeski@[EMAIL PROTECTED] > May 2, 2008 at 02:49 AM

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.




 1 Posts in Topic:
Re: Is there any operator that could raise or lower order of fun
Slobodan Blazeski <slo  2008-05-02 02:49:47 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sun May 11 20:32:41 CDT 2008.