cookbook-2.3.3.1: Tiered general-purpose libraries with domain-specific applications.

PortabilityPortable (Standalone - ghc)
StabilityStable
Maintainernathanpisarski@gmail.com
Safe HaskellSafe-Inferred

Cookbook.Essential.Common

Description

global functions for the entirety of the Cookbook library. Common is the potpourri of Cookbook, with no category except everything uses me!

Synopsis

Documentation

sub :: Eq a => [a] -> Int -> [a]Source

Return a list starting at an index. Indices start at 0.

positions :: Eq a => [a] -> a -> [Int]Source

Find the occurrences of an element in a list.

pos :: Eq a => [a] -> a -> IntSource

C-style wrapper for positions. Returns the first occurrence in a list, or -1 on notElem.

apply :: [a -> a] -> a -> aSource

Reversal of map function. Chains calls of functions over a parameter, starting with head.

flt :: [[a]] -> [a]Source

Flatten a list one level.

fromLast :: ([a] -> [a]) -> [a] -> [a]Source

Execute a function from the end of a list to the front.

afterX :: Eq a => [a] -> a -> Int -> [a]Source

After a certain number of an element, return the list.

iSp :: [a] -> a -> [a]Source

Internal implementation of intersperse.