[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Sc-devel] Function:next :asStream

Hi guys,

One argument for the current policy is to claim that next and embedInStream should describe similar sequences. Function:embedInStream needs to return the function rather than its value. If not, patterns could not define sequences
 of functions.

Of course, embedInStream defines a one element sequence while next returns an infinite sequence, so 'next'
and 'embedInStream' are already different.

And Functions cannot embed other Streams (you need a Routine), so it is already a special case.

I find it tempting....


On Dec 18, 2007, at 11:45 AM, James Harkins wrote:

I think next should do the same thing as value against functions.

Among other benefits, you wouldn't need to write Pfunc() all the time.

Pbind(\freq, { ...})

That would make some things a whole lot easier for me.


On Dec 18, 2007 10:27 AM, Scott Wilson <i@xxxxxxxxxxxxxx> wrote:
Is there a reason why Function:next should not be a synonym for
'value'? (Something to do with the need for FuncStream?)

I've just come across the issue of when next and value are really
interchangeable in a chapter for the book.

Similarly, Function:asStream returns the function itself.

James Harkins /// dewdrop world

"Come said the Muse,
Sing me a song no poet has yet chanted,
Sing me the universal."  -- Whitman
Sc-devel mailing list