[Haskell-cafe] Extensible states
Aleksey Khudyakov
alexey.skladnoy at gmail.com
Wed May 6 16:12:24 UTC 2015
On 6 May 2015 at 00:03, Alberto G. Corona <agocorona at gmail.com> wrote:
> Thanks all of you.
>
> So there is no trick that can make extensible records O(1) for field access,
> like the native haskell records?. I didn´t know that all the extensible
> records have O(n) or O(log n) at most.
>
In principle it's possible to get O(1) access for extensible records. It depends
on how undelying data layout. It's obviously not possible to have O(1) if
record is build from ordinary ADT but if if record internally is array it is
possible. Of course downside is appending is O(n) in that case
More information about the Haskell-Cafe
mailing list