123456789101112131415161718192021222324252627282930313233343536373839404142434445464748openCommonopenOsequence(* growing array ? initialise with None,
* and generate exception when not defined or have an arraydefault
* update: can use dynArray ?
*)(* !!take care!!, this is not a pure data structure *)class['a]oarraynel=object(o:'o)inherit['a]osequencevaldata=Array.makenelmethodempty=raiseTodomethodadd(i,v)=Array.setdataiv;omethoditerf=Array.iteri(Common2.curryf)datamethodview=raiseTodomethodassoci=Array.getdataimethodnull=raiseTodomethodnth=raiseTodomethodmem=raiseTodomethodlast=raiseTodomethodfirst=raiseTodomethoddelkey=raiseTodomethodkeys=raiseTodomethoddel=raiseTodomethodfromlist=raiseTodomethodlength=Array.lengthdata(* method create: int -> 'a -> 'o =
raise Todo
*)(* method put: make more explicit the fact that array do side effect *)end