Skip to content

Use of !! to access the lists by index #1

@werner291

Description

@werner291

Hi,

thanks for this code! Gotta love Simpex noise.

I do have one suggestion though: [1,2,3] gives you a Haskell list. These are linked lists (not arrays), which means that calling !! i takes O(i).

Since your data doesn't change, you're probably better off using Vector, which gives O(1) indexing.

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