List +Data

module Data.List
base Data.List
Operations on lists.
package List
package
A List monad transformer and a List class. With standard list operations for Lists Version 0.5.1
package ListLike
package
Generic support for list-like structures in Haskell. The ListLike module provides a common interface to the various Haskell types that are list-like.  Predefined interfaces include standard Haskell lists, Arrays, ByteStrings, and lazy ByteStrings. Custom types can easily be made ListLike instances as well. ListLike also provides for String-like types, such as String and ByteString, for types that support input and output, and for types that can handle infinite lists. Version 4.0.2
package ListTree
package
Directory tree structure expressed as a monadic tree. Searching, pruning, iterating, and processing trees. Version 0.2.1
package ListZipper
package
List zipper with O(1) get element at cursor, insert at cursor, delete at cursor, move right, and move left operations. Version 1.2.0.2
listToMaybe :: [a] -> Maybe a
base Data.Maybe
The listToMaybe function returns Nothing on an empty list or Just a of the list.
package list-extras
package
Common not-so-common functions for lists. Since Data.List.Extras is prime realestate for extensions to Data.List, if you have something you'd like to contribute feel free to contact the maintainer (I'm friendly). I'm amenable to adopting code if you think your functions aren't enough for a package on their own. Or if you would rather maintain a separate package I can share the Data.List.Extras.Foo namespace. Version 0.4.1.1
package list-grouping
package
Functions for grouping a list into sublists based on predicate or integer offsets. NOTE: THIS MODULE IS DEPRECATED. PLEASE TRY THE split PACKAGE INSTEAD http:hackage.haskell.orgpackagesplit-0.1.3 Grouping a list based on integer offsets: > splitEvery 3 [1..10]  ==  [[1,2,3],[4,5,6],[7,8,9],[10]] > splitWith [1,3,1,3] [1..10]  ==  [[1],[2,3,4],[5],[6,7,8],[9,10]] > splitWithDrop [1,3,1,3] [1..10]  ==  [[1],[2,3,4],[5],[6,7,8]] Grouping based on a predicate: > breakBefore odd [2..9]  ==  [[2],[3,4],[5,6],[7,8],[9]] > breakAfter odd [2..9]  ==  [[2,3],[4,5],[6,7],[8,9]] > breakDrop odd [0,0,0,1,0,1,1,0,0]  ==  [[0,0,0],[0],[0,0]] Please send me any comments, requests or bug reports Version 0.1.1
package list-mux
package
Functions for multiplexing lists Version 1.0
package list-tries
package
This library provides implementations of finite sets and maps for list keys using tries, both simple and of the Patricia kind. In most (or all? sorry, haven't benchmarked yet) cases, the Patricia tries will have better performance, so use them unless you have reasons not to. The data types are parametrized over the map type they use internally to store the child nodes: this allows extending them to support different kinds of key types or increasing efficiency. Child maps are required to be instances of the Map class in Data.ListTrie.Base.Map. Some operations additionally require an OrdMap instance. The Eq, Ord, and Enum modules contain ready structures for key types which are instances of those classes, using lists of pairs, Data.Map, and Data.IntMap respectively. Version 0.5.1
listArray :: (IArray a e, Ix i) => (i, i) -> [e] -> a i e
array Data.Array.IArray
Constructs an immutable array from a list of initial elements. The list gives the elements of the array in ascending order beginning with the lowest index.
listArray :: Ix i => (i, i) -> [e] -> Array i e
array Data.Array
Construct an array from a pair of bounds and a list of values in index order.
listify :: Typeable r => (r -> Bool) -> GenericQ [r]
syb Data.Generics.Schemes
Get a list of all entities that meet a predicate
package listlike-instances
package
Provides ListLike instances for Vector and Text types Version 0.2.3.1
package lists
package
Functions for dealing with lists Version 0.4.2
fromList :: Eq key => (key -> Int32) -> [(key, val)] -> IO (HashTable key val)
base Data.HashTable
Convert a list of key/value pairs into a hash table. Equality on keys is taken from the Eq instance for the key type.
maybeToList :: Maybe a -> [a]
base Data.Maybe
The maybeToList function returns an empty list when given Nothing or a singleton list when not given Nothing.
toList :: HashTable key val -> IO [(key, val)]
base Data.HashTable
Converts a hash table to a list of key/value pairs.
toList :: Foldable t => t a -> [a]
base Data.Foldable
List of elements of a structure.
package arrow-list
package
This small Haskell library provides some type class, types and functions to work with list (and list-like) arrows. List arrows represent computations that may return multiple outputs. Making functions that return lists an instance of both the `Category` and `Arrow` type class allow you to easily compose multiple computations into one with standard building blocks. Version 0.6.1
package capped-list
package
package data-clist
package
Simple functional bidirectional ring type. Given that the ring terminiology clashes with certain mathematical branches, we're using the term CList or CircularList instead. Version 0.0.7.2
package data-default-instances-dlist
package
package data-list-sequences
package
Find sequences within lists. Version 0.1
package data-ordlist
package
This module provides set and multiset operations on ordered lists. Version 0.4.5
package dlist
package
Difference lists are a list-like type supporting O(1) append. This is particularly useful for efficient logging and pretty printing (e.g. with the Writer monad), where list append quickly becomes too expensive. Version 0.6.0.1
ekList :: Network -> Node -> Node -> (Network, Double)
fgl Data.Graph.Inductive.Query.MaxFlow2
package event-list
package
These lists manage events that are associated with times. Times may be given as difference between successive events or as absolute time values. Pauses before the first and after the last event are supported. The underlying data structures are lists of elements of alternating types, that is [b,a,b,...,a,b] or [a,b,a,...,a,b]. The data structures can be used to represent MIDI files, OpenSoundControl message streams, music performances etc. Version 0.1.0.2
package failable-list
package
package fixed-list
package
A fixed length list type that encodes its length in its type in a natural way, and is a member of Applicative, Functor, Foldable, Traversable, and Monad. Version 0.1.5
package fmlist
package
FoldMap lists are lists represented by their foldMap function. FoldMap lists have O(1) cons, snoc and append, just like DLists, but other operations might have favorable performance characteristics as well. These wild claims are still completely unverified though. Version 0.8
fmToList :: Ord a => FiniteMap a b -> [(a, b)]
fgl Data.Graph.Inductive.Internal.FiniteMap
fromAscList :: [(Key, a)] -> IntMap a
containers Data.IntMap.Strict, containers Data.IntMap.Lazy
O(n). Build a map from a list of key/value pairs are in ascending order. > fromAscList [(3,"b"), (5,"a")] == fromList [(3, "b"), (5, "a")] > fromAscList [(3,"b"), (5,"a"), (5,"b")] == fromList [(3, "b"), (5, "b")]
fromAscList :: [Key] -> IntSet
containers Data.IntSet
O(n). Build a set from an ascending list of elements. The precondition (input list is ascending) is not checked.
fromAscList :: Eq a => [a] -> Set a
containers Data.Set
O(n). Build a set from an ascending list in linear time. The precondition (input list is ascending) is not checked.
fromAscList :: Eq k => [(k, a)] -> Map k a
containers Data.Map.Lazy, containers Data.Map.Strict
O(n). Build a map from an ascending list in linear time. The precondition (input list is ascending) is not checked. > fromAscList [(3,"b"), (5,"a")] == fromList [(3, "b"), (5, "a")] > fromAscList [(3,"b"), (5,"a"), (5,"b")] == fromList [(3, "b"), (5, "b")] > valid (fromAscList [(3,"b"), (5,"a"), (5,"b")]) == True > valid (fromAscList [(5,"a"), (3,"b"), (5,"b")]) == False
fromAscListWith :: (a -> a -> a) -> [(Key, a)] -> IntMap a
containers Data.IntMap.Strict, containers Data.IntMap.Lazy
O(n). Build a map from a list of key/value pairs are in ascending order, with a combining function on equal keys. The precondition (input list is ascending) is not checked. > fromAscListWith (++) [(3,"b"), (5,"a"), (5,"b")] == fromList [(3, "b"), (5, "ba")]
fromAscListWith :: Eq k => (a -> a -> a) -> [(k, a)] -> Map k a
containers Data.Map.Lazy, containers Data.Map.Strict
O(n). Build a map from an ascending list in linear time with a combining function for equal keys. The precondition (input list is ascending) is not checked. > fromAscListWith (++) [(3,"b"), (5,"a"), (5,"b")] == fromList [(3, "b"), (5, "ba")] > valid (fromAscListWith (++) [(3,"b"), (5,"a"), (5,"b")]) == True > valid (fromAscListWith (++) [(5,"a"), (3,"b"), (5,"b")]) == False
fromAscListWithKey :: (Key -> a -> a -> a) -> [(Key, a)] -> IntMap a
containers Data.IntMap.Strict
O(n). Build a map from a list of key/value pairs are in ascending order, with a combining function on equal keys. The precondition (input list is ascending) is not checked. > fromAscListWith (++) [(3,"b"), (5,"a"), (5,"b")] == fromList [(3, "b"), (5, "ba")]
fromAscListWithKey :: (Key -> a -> a -> a) -> [(Key, a)] -> IntMap a
containers Data.IntMap.Lazy
O(n). Build a map from a list of key/value pairs are in ascending order, with a combining function on equal keys. The precondition (input list is ascending) is not checked. > let f key new_value old_value = (show key) ++ ":" ++ new_value ++ "|" ++ old_value > fromAscListWithKey f [(3,"b"), (5,"a"), (5,"b")] == fromList [(3, "b"), (5, "5:b|a")]

Show more results