Skip to content

Inaccuracy in description of doubly linked list pervasiveness in functional languages #1376

@guygastineau

Description

@guygastineau

The doubly linked list is a fundamental data structure in computer science,

I first checked in problem-specifications thinking the error were there, but it is rather here ;)

The paragraph starting with the line above (for some reason I couldn't highlight the whole selection) states that doubly linked lists are pervasive in functional programming languages like Haskell, lisps, et al., but this is not true. Our pervasive lists in functional languages are singly linked. Take this simple re-implementation of [a] in haskell as an example. NB. Lists are built into haskell's runtime or I would just link the definition from its standard library.

data List a = Cons a (List a) | Nil

The above definition while less efficient is isomorphic to the implementation of lists that is so pervasive in Haskell.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions