Talk About Network

Google


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 2833 of 2887
Post > Topic >>

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

by Chris Russell <christopher.m.russell@[EMAIL PROTECTED] > May 2, 2008 at 03:22 AM

On May 2, 10:49=A0am, Slobodan Blazeski <slobodan.blaze...@[EMAIL PROTECTED]
>
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, pu****ng 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.
 




 1 Posts in Topic:
Re: Is there any operator that could raise or lower order of fun
Chris Russell <christo  2008-05-02 03:22:23 

Post A Reply:
  Go here to Signup

AddThis Feed Button


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

Contact
tan12V112 Wed Jul 9 6:10:08 CDT 2008.