List +Data +package
A List monad transformer and a List class. With standard list operations for Lists
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.
Directory tree structure expressed as a monadic tree. Searching, pruning, iterating, and processing trees.
List zipper with O(1) get element at cursor, insert at cursor, delete at cursor, move right, and move left operations.
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.
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],]
> splitWith [1,3,1,3] [1..10] == [,[2,3,4],,[6,7,8],[9,10]]
> splitWithDrop [1,3,1,3] [1..10] == [,[2,3,4],,[6,7,8]]
Grouping based on a predicate:
> breakBefore odd [2..9] == [,[3,4],[5,6],[7,8],]
> 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]]
Please send me any comments, requests or bug reports
Functions for multiplexing lists
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.
Provides ListLike instances for Vector and Text types
Functions for dealing with lists
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.
Simple functional bidirectional ring type. Given that the ring terminiology clashes with certain mathematical branches, we're using the term CList or CircularList instead.
Find sequences within lists.
This module provides set and multiset operations on ordered lists.
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.
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.
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.
Show more results