Effect CommunityEC
Effect Community2y ago
3 replies
addamsson

Missing Documentation for List in Data Chunk

I'm looking at Data right now and I've noticed that there is a reference in the docs for Chunk to List, but looking for List yields nothing on the docs page. If I look under the hood I can see that it is a linked list:
/**
 * Represents an immutable linked list of elements of type `A`.
 *
 * A `List` is optimal for last-in-first-out (LIFO), stack-like access patterns.
 * If you need another access pattern, for example, random access or FIFO,
 * consider using a collection more suited for that other than `List`.
 *
 * @since 2.0.0
 * @category models
 */
export type List<A> = Cons<A> | Nil<A>

and Chunk is usually backed by an Array, but I think it would be a good idea if List was added on the docs pace (and the difference between them explained, possibly with some usage examples)
Was this page helpful?