[e-lang] Documentation bug for FlexList

Kevin Reid kpreid at mac.com
Fri Mar 16 07:09:36 CDT 2007


On Mar 15, 2007, at 23:43, David Hopwood wrote:

> <http://erights.org/javadoc/org/erights/e/elib/tables/FlexList.html>
>
> # void setRun(int start, int bound, EList other)
> # Enabled: Replace from start..!bound in this list with other.
>
> ? def a := [2, 3, 4].diverge()
> # value: [2, 3, 4].diverge()
>
> ? a.setRun(0, 0, [1])
> ? a
> # value: [1, 2, 3, 4].diverge()
>
> 1. Why is this called 'setRun'? 'insertRun' would make more sense.

Note that the name "setRun" is part of the assignment sugar:

   a(b, c) := d

expands to

   a.setRun(b, c, def ares__1 := d)
   ares__1

, and a(b, c) is of course a.run(b, c).

Whatever name change you propose must also fit generically into the  
assignment sugar.

Separately:

- Calling this "replacement" in the documentation is consistent with  
replace/5, which is the same operation except with the ability to  
specify a subrange of the source list.

- What would you think of the name "putRun"?

-- 
Kevin Reid                            <http://homepage.mac.com/kpreid/>




More information about the e-lang mailing list