q2K BHP
Black History Portal
THE BHP WIRE —
HIDDEN TRUTHS
What's New!
THE JOURNEY THROUGH TIME

Explore Black History

Explore the people, places, events, achievements, struggles and stories that shaped our journey.

✊🏾

Civil Rights

Movements, leaders, victories and the continuing fight for equality.

⚙️

Black Inventors

Innovation, patents, science, technology and world-changing contributions.

🏆

Sports

Pioneers, champions, Negro Leagues, records, activism and excellence.

♟️

People

Meet the people whose lives, choices and achievements shaped the journey.

📍

Places

Black towns, communities, institutions and places where history happened.

📜

Events

Moments that changed communities, movements, institutions and the nation.

Enter a person, place, event, or topic.
MY'STORY

The MOVE Fire

This is a personal recollection on the Move fire on May 13, 1985 Philadelphia police fired thousands of rounds at the MOVE house, city officials approved dropping an explosive device on the roof, the resulting fire was allowed to burn, 11 people—including five children—died, and 61 homes were destroyed. Philadelphia City Council later called it a “brutal attack carried out by the City of Philadelphia on its own citizens” and acknowledged that no individual faced criminal consequences for the bombing. One timeline correction worth preserving for the BHP record: the major previous MOVE-police confrontation was August 8, 1978, about seven years before the bombing, not a year or two earlier. Officer James Ramp was killed, other police and firefighters were wounded, nine MOVE members were later convicted, and television cameras recorded police beating Delbert Africa during his arrest. The 1985 MOVE Commission later specifically criticized city planners for failing to adequately use lessons from that 1978 confrontation. And that actually strengthens the point you’re making: 1985 did not happen without precedent or institutional memory. There had already been a deadly confrontation with MOVE, years of conflict, negotiations and police involvement before Osage Avenue.

MORE →
BLACK FACTS
The Truths They Never Taught You...

Wilmington 1898 — An American Coup

Wilmington, North Carolina once had a thriving Black middle class and an elected interracial government. In 1898 white supremacists used violence to overthrow that government, kill Black residents and drive many others from the city.

MORE →
BHP gathered finds from its connected research sources. Showing the 4 strongest Black History matches.
← BACK TO RESULTS
Wikipedia

List (abstract data type)

In computer science, a list or sequence is a collection of items that are finite in number and in a particular order. An instance of a list is a computer representation of the mathematical concept of a tuple or finite sequence.

A list may contain the same value more than once, and each occurrence is considered a distinct item.

A singly-linked list structure, implementing a list with three integer elements

The term list is also used for several concrete data structures that can be used to implement abstract lists, especially linked lists and arrays. In some contexts, such as in Lisp programming, the term list may refer specifically to a linked list rather than an array. In class-based programming, lists are usually provided as instances of subclasses of a generic "list" class, and traversed via separate iterators.

Many programming languages provide support for list data types, and have special syntax and semantics for lists and list operations. A list can often be constructed by writing the items in sequence, separated by commas, semicolons, and/or spaces, within a pair of delimiters such as parentheses '()', brackets '[]', braces '{}', or angle brackets '<>'. Some languages may allow list types to be indexed or sliced like array types, in which case the data type is more accurately described as an array.

In type theory and functional programming, abstract lists are usually defined inductively by two operations: nil that yields the empty list, and cons, which adds an item at the beginning of a list.[1]

A stream is the potentially infinite analog of a list.[2]: §3.5 

Operations

[edit]

Implementation of the list data structure may provide some or all of the following operations as low level primitives:

  • Create an empty list
  • Test for the list being empty
  • Prepend an item to the list
  • Append an item at the list's end
  • get the first or the last item of a list
  • get the remainder of the list past its first or last item
  • get an item by index of its position in a list
  • create a list containing a single given item
  • create a list containing given items
  • append two lists
  • map, flatmap, filter, reduce, etc.

Implementations

[edit]

Lists are typically implemented either as linked lists (either singly or doubly linked) or as arrays, usually variable length or dynamic arrays.

The standard way of implementing lists, originating with the programming language Lisp, is to have each element of the list contain both its value and a pointer indicating the location of the next element in the list. This results in either a linked list or a tree, depending on whether the list has nested sublists. Some older Lisp implementations (such as the Lisp implementation of the Symbolics 3600) also supported "compressed lists" (using CDR coding) which had a special internal representation (invisible to the user). Lists can be manipulated using iteration or recursion. The former is often preferred in imperative programming languages, while the latter is the norm in functional languages.

Lists can be implemented as self-balancing binary search trees holding index-value pairs, providing equal-time access to any element (e.g. all residing in the fringe, and internal nodes storing the right-most child's index, used to guide the search), taking the time logarithmic in the list's size, but as long as it doesn't change much will provide the illusion of random access and enable swap, prefix and append operations in logarithmic time as well.[3]

Programming language support

[edit]

Some programming languages offer no list data structure, but offer the use of associative arrays or some kind of table to emulate lists. For example, Lua provides tables. Although Lua stores lists that have numerical indices as arrays internally, they still appear as dictionaries.[4]

In Lisp, lists are the fundamental data type and can represent both program code and data. In most Lisp dialects, the list of the first three prime numbers could be written as (list 2 3 5). In several dialects, including Scheme, a list is a set of pairs, consisting of a value and a pointer to the next pair (or null value), making a singly linked list.[5]

Applications

[edit]

Unlike in an array, a list can expand and shrink.

In computing, lists are easier to implement than sets. A finite set in the mathematical sense can be realized as a list with additional restrictions; that is, duplicate elements are disallowed and order is irrelevant. Sorting the list speeds up determining if a given item is already in the set, but in order to ensure the order, it requires more time to add a new entry to the list. In efficient implementations, however, sets are implemented using self-balancing binary search trees or hash tables, rather than a list.

Lists also form the basis for other abstract data types including the queue, the stack, and their variations.

Abstract definition

[edit]

The abstract list type L with elements of some type E (a monomorphic list) is defined by the following functions:

nil: () → L
cons: E × L → L
first: L → E
rest: L → L

with the axioms

first (cons (e, l)) = e
rest (cons (e, l)) = l

for any element e and any list l. It is implicit that

cons (e, l) ≠ l
cons (e, l) ≠ e
cons (e1, l1) = cons (e2, l2) if e1 = e2 and l1 = l2

Note that first (nil ()) and rest (nil ()) are not defined.

These axioms are equivalent to those of the abstract stack data type.

In type theory, the above definition is more simply regarded as an inductive type defined in terms of constructors: nil and cons. In algebraic terms, this can be represented as the transformation 1 + E × L → L. first and rest are then obtained by pattern matching on the cons constructor and separately handling the nil case.

The list monad

[edit]

The list type forms a monad with the following functions (using E* rather than L to represent monomorphic lists with elements of type E):

where append is defined as:

Alternatively, the monad may be defined in terms of operations return, fmap and join, with:

Note that fmap, join, append and bind are well-defined, since they're applied to progressively deeper arguments at each recursive call.

The list type is an additive monad, with nil as the monadic zero and append as monadic sum.

Lists form a monoid under the append operation. The identity element of the monoid is the empty list, nil. In fact, this is the free monoid over the set of list elements.

See also

[edit]
  • Array data type – Data type that represents an ordered collection of elements (values or variables)
  • Queue – Abstract data type
  • Set – Abstract data type for storing distinct values
  • Stack – Abstract data type
  • Stream – Sequence of data items available over time

References

[edit]
  1. ^ Reingold, Edward; Nievergelt, Jurg; Narsingh, Deo (1977). Combinatorial Algorithms: Theory and Practice. Englewood Cliffs, New Jersey: Prentice Hall. pp. 38–41. ISBN 0-13-152447-X.
  2. ^ Abelson, Harold; Sussman, Gerald Jay (1996). Structure and Interpretation of Computer Programs. MIT Press.
  3. ^ Barnett, Granville; Del tonga, Luca (2008). "Data Structures and Algorithms" (PDF). mta.ca. Retrieved 12 November 2014.
  4. ^ Lerusalimschy, Roberto (December 2003). Programming in Lua (1st ed.). Lua.org. ISBN 8590379817. Retrieved 12 November 2014.
  5. ^ Steele, Guy (1990). Common Lisp (2nd ed.). Digital Press. pp. 29–31. ISBN 1-55558-041-6.

Source: Wikipedia. Article content is retrieved live through the MediaWiki API.

No preview image
Wikipedia

List (abstract data type)

In computer science, a list or sequence is a collection of items that are finite in number and in a particular order. An instance of a list is a computer representation of the mathematical concept of a tuple or finite sequence. A list may contain the same value more than once, and each occurrence is considered a distinct item. The term list is also used for several concrete data structures that can be used to implement abstract lists, especially linked lists and arrays. In some contexts, such as in Lisp programming, the term list may refer specifically to a linked list rather than an array. In class-based programming, lists are usually provided as instances of subclasses of a generic "list" class, and traversed via separate iterators. Many programming languages provide support for list data types, and have special syntax and semantics for lists and list operations. A list can often be constructed by writing the items in sequence, separated by commas, semicolons, and/or spaces, within a pair of delimiters such as parentheses '()', brackets '[]', braces '{}', or angle brackets ''. Some languages may allow list types to be indexed or sliced like array types, in which case the data type is more accurately described as an array. In type theory and functional programming, abstract lists are usually defined inductively by two operations: nil that yields the empty list, and cons, which adds an item at the beginning of a list. A stream is the potentially infinite analog of a list.

MORE →
No preview image
Wikipedia

List of party video games

This is a chronological list of party video games. The genre features a collection of minigames, designed to be intuitive and easy to control, and allow for competition between many players.

MORE →
Wikipedia

Question

A question is an utterance which serves as a request for information. Questions are sometimes distinguished from interrogatives, which are the grammatical forms, typically used to express them. Rhetorical questions, for instance, are interrogative in form but may not be considered bona fide questions, as they are not expected to be answered. Questions come in a number of varieties. For instance, polar questions are those such as the English example "Is this a polar question?", which can be answered with "yes" or "no". Alternative questions such as "Is this a polar question, or an alternative question?" present a list of possibilities to choose from. Open questions such as "What kind of question is this?" allow many possible resolutions. Questions are widely studied in linguistics and philosophy of language. In the subfield of pragmatics, questions are regarded as illocutionary acts which raise an issue to be resolved in discourse. In approaches to formal semantics such as alternative semantics or inquisitive semantics, questions are regarded as the denotations of interrogatives, and are typically identified as sets of the propositions which answer them.

MORE →
No preview image
Wikipedia

List of Marvel Cinematic Universe films

The Marvel Cinematic Universe (MCU) centers on American superhero films produced by Marvel Studios, based on characters from Marvel Comics publications. The MCU is the shared universe in which all of the films are set. Marvel Studios has released 38 films since 2008 and has at least eight more in various stages of development. Marvel Studios president Kevin Feige has produced every MCU film, with some films having additional producers and production companies. The Spider-Man films are owned, financed, and distributed by Sony Pictures and co-produced by Sony's Columbia Pictures and Pascal Pictures. The MCU films are written and directed by various individuals and feature large, often ensemble, casts. They are released in groups called "Phases", with three phases making up a "Saga". The MCU is the highest-grossing film franchise of all time, grossing over $35.1 billion at the global box office. This includes Avengers: Endgame, which is the highest-grossing film ever. The films from Phases One, Two, and Three are collectively known as "The Infinity Saga". The first MCU film, Iron Man (2008), was distributed by Paramount Pictures. Paramount also distributed Iron Man 2 (2010), Thor (2011), and Captain America: The First Avenger (2011), while Universal Pictures distributed The Incredible Hulk (2008). Walt Disney Studios Motion Pictures began distributing the series with the crossover film The Avengers (2012), which concluded Phase One. Phase Two comprises Iron Man 3 (2013), Thor: The Dark World (2013), Captain America: The Winter Soldier (2014), Guardians of the Galaxy (2014), Avengers: Age of Ultron (2015), and Ant-Man (2015). Captain America: Civil War (2016) started Phase Three, followed by Doctor Strange (2016), Guardians of the Galaxy Vol. 2 (2017), Spider-Man: Homecoming (2017), Thor: Ragnarok (2017), Black Panther (2018), Avengers: Infinity War (2018), Ant-Man and the Wasp (2018), Captain Marvel (2019), Avengers: Endgame, and Spider-Man: Far From Home (2019). The films from Phases Four, Five, and Six are collectively known as "The Multiverse Saga". These phases also include television series and television specials streaming on Disney+. The Phase Four films are Black Widow (2021), Shang-Chi and the Legend of the Ten Rings (2021), Eternals (2021), Spider-Man: No Way Home (2021), Doctor Strange in the Multiverse of Madness (2022), Thor: Love and Thunder (2022), and Black Panther: Wakanda Forever (2022). Phase Five features Ant-Man and the Wasp: Quantumania (2023), Guardians of the Galaxy Vol. 3 (2023), The Marvels (2023), Deadpool & Wolverine (2024), Captain America: Brave New World (2025), and Thunderbolts* (2025). Phase Six began with The Fantastic Four: First Steps (2025), and also includes Spider-Man: Brand New Day (2026), Avengers: Doomsday (2026), and Avengers: Secret Wars (2027). The next MCU saga will start with an X-Men film in 2028, followed by Ghost Rider and Black Panther III later that year.

MORE →
TOPIC OF THE DAY

Greenwood / Black Wall Street

Before the 1921 destruction of Tulsa’s Greenwood District, Black residents had created a remarkable center of business and community life. The district included stores, professional offices, entertainment venues and homes owned by Black citizens. Understanding Greenwood means learning what was built—not only what was burned.

MORE →
TRIVIA QUESTION OF THE DAY

Which Supreme Court case ruled state-sponsored public-school segregation unconstitutional?

Brown v. Board of Education in 1954.