Hoogle Search
Within LTS Haskell 24.34 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
reverseTakeFromEndG :: (Integral b, InsertLeft t a, Monoid (t a)) => b -> t a -> t amonoid-insertleft Data.InsertLeft Inspired by: Graham Hutton. A tutorial on the universality and expressiveness of fold. J. Functional Programming 9 (4): 355–372, July 1999. that is available at the URL: https://www.cs.nott.ac.uk/~pszgmh/fold.pdf. Takes the specified quantity from the right end of the structure and then reverses the result.
reverseTakeG :: (Integral b, InsertLeft t a, Monoid (t a)) => b -> t a -> t amonoid-insertleft Data.InsertLeft Inspired by: Graham Hutton. A tutorial on the universality and expressiveness of fold. J. Functional Programming 9 (4): 355–372, July 1999. that is available at the URL: https://www.cs.nott.ac.uk/~pszgmh/fold.pdf. Is analogous to the taking the specified quantity from the structure and then reversing the result. Uses strict variant of the foldl, so is not suitable for large amounts of data. Not recommended for performance reasons. For lists just use the combination (reverse . take n).
fromSet :: MonoidNull v => (k -> v) -> Set k -> MonoidMap k vmonoidmap-internal Data.MonoidMap.Internal Constructs a MonoidMap from a Set and a function from keys to values. Satisfies the following property for all possible keys k:
get k (fromSet f ks) == if Set.member k ks then f k else mempty
This function performs canonicalisation of null values, and has a time complexity that is linear in the size of the set.-
monoidmap-internal Data.MonoidMap.Internal.RecoveredMap No documentation available.
-
An efficient implementation of multisets of integers, also sometimes called bags. A multiset is like a set, but it can contain multiple copies of the same element. Since many function names (but not the type name) clash with Prelude names, this module is usually imported qualified, e.g.
import Data.IntMultiSet (IntMultiSet) import qualified Data.IntMultiSet as IntMultiSet
The implementation of IntMultiSet is based on the Data.IntMap module. Many operations have a worst-case complexity of O(min(n,W)). This means that the operation can become linear in the number of elements with a maximum of W -- the number of bits in an Int (32 or 64). Here n refers to the number of distinct elements, t is the total number of elements. -
multiset Data.IntMultiSet A multiset of integers. The same value can occur multiple times.
fromSet :: IntSet -> IntMultiSetmultiset Data.IntMultiSet O(n). Convert an IntMap to a multiset.
isProperSubsetOf :: IntMultiSet -> IntMultiSet -> Boolmultiset Data.IntMultiSet O(n+m). Is this a proper subset? (ie. a subset but not equal).
isSubsetOf :: IntMultiSet -> IntMultiSet -> Boolmultiset Data.IntMultiSet O(n+m). Is this a subset? (s1 `isSubsetOf` s2) tells whether s1 is a subset of s2.
toSet :: IntMultiSet -> IntSetmultiset Data.IntMultiSet O(n). Convert a multiset to an IntMap, removing duplicates.