Skip to content

Incorrect example code in Regions section #256

@chtenb

Description

@chtenb

I'm reading for the first time through the docs and the Regions section confused, and I think the example code is wrong. It says

https://doc.flix.dev/regions.html

def toMutDeque(rc: Region[r], l: List[a]): MutDeque[a, rc] \ rc =
    let d = MutDeque.empty(rc);
    forEach(x -> MutDeque.pushBack(x, d), l);
    d

But rc is a value, not a type. I think it should read r.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions