Ladislav said:
Have tried to implement immutable lists instead of blocks
to use for purely functional programming with o(1) prepend
time, but enumerate still doesn't work for more than 1000
elements because of stack overflow...
This doesn't exhibit the stack overflow, but it isn't functional
either:
enumerate-interval: func [start end] [
result: make block! (end - start)
for i start end 1 [result: insert result i]
return head result
]
Since REBOL doesn't have any functional iterators with state
variables, I'm not sure it is possible to write mostly functional
code that can handle reasonable amounts of data. Again, we're
pushed back to imperative style.
John
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com