Search results
catMaybes :: forall a. Array (Maybe a) -> Array a
Filter an array of optional values, keeping only the elements which contain a value, creating a new array.
catMaybes [Nothing, Just 2, Nothing, Just 4] = [2, 4]
untilJust :: forall a m. MonadRec m => m (Maybe a) -> m a
Supplied computation will be executed repeatedly until it evaluates
to Just value
and then that value
will be returned.
whileJust :: forall a m. Monoid a => MonadRec m => m (Maybe a) -> m a
While supplied computation evaluates to Just _
, it will be
executed repeatedly and results will be combined using monoid instance.
init :: forall a. Partial => Array a -> Array a
Get all but the last element of a non-empty array.
Running time: O(n)
, where n
is the length of the array.
nub :: forall a. Ord a => Array a -> Array a
Remove the duplicates from an array, creating a new array.
nub [1, 2, 1, 3, 3] = [1, 2, 3]
nubEq :: forall a. Eq a => Array a -> Array a
Remove the duplicates from an array, creating a new array.
This less efficient version of nub
only requires an Eq
instance.
nubEq [1, 2, 1, 3, 3] = [1, 2, 3]
reverse :: forall a. Array a -> Array a
Reverse an array, creating a new array.
reverse [] = []
reverse [1, 2, 3] = [3, 2, 1]
sort :: forall a. Ord a => Array a -> Array a
Sort the elements of an array in increasing order, creating a new array. Sorting is stable: the order of equal elements is preserved.
sort [2, -3, 1] = [-3, 1, 2]
tail :: forall a. Partial => Array a -> Array a
Get all but the first element of a non-empty array.
Running time: O(n)
, where n
is the length of the array.
filtered :: forall m a. MonadRec m => MonadGen m => m (Maybe a) -> m a
Creates a generator that repeatedly run another generator until it produces
Just
node. This will never halt if the input generator always produces Nothing
.
compact :: forall f a. Compactable f => f (Maybe a) -> f a
compactDefault :: forall f a. Functor f => Compactable f => f (Maybe a) -> f a
nubHash :: forall a. Hashable a => Array a -> Array a
Remove duplicates from an array.
Like nub
from Data.Array
, but uses a Hashable
constraint
instead of an Ord
constraint.
a_ :: forall html a. Html html => Array (html a) -> html a
Defines a hyperlink [No Attributes]
a_ :: forall html a. Html html => Array (html a) -> html a
Creates a hyperlink element [No Attributes]
abbr_ :: forall html a. Html html => Array (html a) -> html a
Defines an abbreviation [No Attributes]
address_ :: forall html a. Html html => Array (html a) -> html a
Defines contact information for the author/owner of a document [No Attributes]
altGlyph_ :: forall html a. Html html => Array (html a) -> html a
Defines an alternative representation of a glyph in a font [No Attributes]
altGlyphDef_ :: forall html a. Html html => Array (html a) -> html a
Defines a set of glyph substitutions for an altGlyph element [No Attributes]
altGlyphItem_ :: forall html a. Html html => Array (html a) -> html a
Defines a substitution for a specific glyph in an altGlyphDef element [No Attributes]
article_ :: forall html a. Html html => Array (html a) -> html a
Defines self-contained content, like blog posts or news articles [No Attributes]
aside_ :: forall html a. Html html => Array (html a) -> html a
Defines content aside from the content it is placed in [No Attributes]
audio_ :: forall html a. Html html => Array (html a) -> html a
Defines sound content, like music or other audio streams [No Attributes]
b_ :: forall html a. Html html => Array (html a) -> html a
Defines bold text [No Attributes]
bdi_ :: forall html a. Html html => Array (html a) -> html a
Defines text directionality for its children [No Attributes]
bdo_ :: forall html a. Html html => Array (html a) -> html a
Defines text directionality [No Attributes]
blockquote_ :: forall html a. Html html => Array (html a) -> html a
Defines a section that is quoted from another source [No Attributes]
body_ :: forall html a. Html html => Array (html a) -> html a
Defines the document's body [No Attributes]
button_ :: forall html a. Html html => Array (html a) -> html a
Defines a clickable button [No Attributes]
canvas_ :: forall html a. Html html => Array (html a) -> html a
Defines an area that can be used to draw graphics using JavaScript [No Attributes]
caption_ :: forall html a. Html html => Array (html a) -> html a
Defines a table caption [No Attributes]
cite_ :: forall html a. Html html => Array (html a) -> html a
Defines the title of a work [No Attributes]
clipPath_ :: forall html a. Html html => Array (html a) -> html a
Defines a clipping path for an SVG element [No Attributes]
code_ :: forall html a. Html html => Array (html a) -> html a
Defines a piece of computer code [No Attributes]
colgroup_ :: forall html a. Html html => Array (html a) -> html a
Defines attributes for a group of table columns [No Attributes]
colorProfile_ :: forall html a. Html html => Array (html a) -> html a
Defines a color profile for an SVG document [No Attributes]
data__ :: forall html a. Html html => Array (html a) -> html a
Defines machine-readable data [No Attributes]
datalist_ :: forall html a. Html html => Array (html a) -> html a
Defines a list of pre-defined options for input controls [No Attributes]
dd_ :: forall html a. Html html => Array (html a) -> html a
Defines a description/value of a term in a description list [No Attributes]
defs_ :: forall html a. Html html => Array (html a) -> html a
Defines a set of reusable SVG elements [No Attributes]
del_ :: forall html a. Html html => Array (html a) -> html a
Defines text that has been deleted from a document [No Attributes]
desc_ :: forall html a. Html html => Array (html a) -> html a
Defines a description of an SVG element [No Attributes]
details_ :: forall html a. Html html => Array (html a) -> html a
Defines additional details that the user can view or hide [No Attributes]
dfn_ :: forall html a. Html html => Array (html a) -> html a
Defines a definition term [No Attributes]
dialog_ :: forall html a. Html html => Array (html a) -> html a
Defines a dialog box or window [No Attributes]
div_ :: forall html a. Html html => Array (html a) -> html a
Defines a section of a document [No Attributes]
dl_ :: forall html a. Html html => Array (html a) -> html a
Defines a description list [No Attributes]
dt_ :: forall html a. Html html => Array (html a) -> html a
Defines a term in a description list [No Attributes]
em_ :: forall html a. Html html => Array (html a) -> html a
Defines emphasized text [No Attributes]
feMerge_ :: forall html a. Html html => Array (html a) -> html a
Merges multiple input images together [No Attributes]
fieldset_ :: forall html a. Html html => Array (html a) -> html a
Groups related form elements [No Attributes]
figcaption_ :: forall html a. Html html => Array (html a) -> html a
Defines a caption for a <figure> element [No Attributes]
figure_ :: forall html a. Html html => Array (html a) -> html a
Defines self-contained content, like images or diagrams [No Attributes]
filter_ :: forall html a. Html html => Array (html a) -> html a
Defines a filter effect [No Attributes]
footer_ :: forall html a. Html html => Array (html a) -> html a
Defines a footer for a document or section [No Attributes]
foreignObject_ :: forall html a. Html html => Array (html a) -> html a
Inserts a foreign object into an SVG document [No Attributes]
form_ :: forall html a. Html html => Array (html a) -> html a
Defines an HTML form for user input [No Attributes]
g_ :: forall html a. Html html => Array (html a) -> html a
Creates a group of SVG elements [No Attributes]
glyph_ :: forall html a. Html html => Array (html a) -> html a
Defines a single glyph in an SVG font [No Attributes]
h1_ :: forall html a. Html html => Array (html a) -> html a
Defines a heading level 1 [No Attributes]
h2_ :: forall html a. Html html => Array (html a) -> html a
Defines a heading level 2 [No Attributes]
h3_ :: forall html a. Html html => Array (html a) -> html a
Defines a heading level 3 [No Attributes]
h4_ :: forall html a. Html html => Array (html a) -> html a
Defines a heading level 4 [No Attributes]
h5_ :: forall html a. Html html => Array (html a) -> html a
Defines a heading level 5 [No Attributes]
h6_ :: forall html a. Html html => Array (html a) -> html a
Defines a heading level 6 [No Attributes]
hatch_ :: forall html a. Html html => Array (html a) -> html a
Defines a hatching pattern [No Attributes]
head_ :: forall html a. Html html => Array (html a) -> html a
Defines information about the document [No Attributes]
header_ :: forall html a. Html html => Array (html a) -> html a
Defines a header for a document or section [No Attributes]
html_ :: forall html a. Html html => Array (html a) -> html a
Defines the root of an HTML document [No Attributes]
i_ :: forall html a. Html html => Array (html a) -> html a
Defines italic text [No Attributes]
iframe_ :: forall html a. Html html => Array (html a) -> html a
Defines an inline frame for embedding external content [No Attributes]
ins_ :: forall html a. Html html => Array (html a) -> html a
Defines text that has been inserted into a document [No Attributes]
kbd_ :: forall html a. Html html => Array (html a) -> html a
Defines keyboard input [No Attributes]
label_ :: forall html a. Html html => Array (html a) -> html a
Defines a label for an <input> element [No Attributes]
legend_ :: forall html a. Html html => Array (html a) -> html a
Defines a caption for a <fieldset> element [No Attributes]
li_ :: forall html a. Html html => Array (html a) -> html a
Defines a list item [No Attributes]
linearGradient_ :: forall html a. Html html => Array (html a) -> html a
Defines a linear gradient for an SVG element [No Attributes]
main_ :: forall html a. Html html => Array (html a) -> html a
Defines the main content of a document [No Attributes]
map_ :: forall html a. Html html => Array (html a) -> html a
Defines an image map [No Attributes]
mark_ :: forall html a. Html html => Array (html a) -> html a
Defines marked/highlighted text [No Attributes]
marker_ :: forall html a. Html html => Array (html a) -> html a
Defines a marker symbol to be used with a shape or line [No Attributes]
mask_ :: forall html a. Html html => Array (html a) -> html a
Defines a mask for an SVG element [No Attributes]
menu_ :: forall html a. Html html => Array (html a) -> html a
Defines a list/menu of commands [No Attributes]
meter_ :: forall html a. Html html => Array (html a) -> html a
Defines a scalar measurement within a known range [No Attributes]
mpath_ :: forall html a. Html html => Array (html a) -> html a
The mpath element provides a way to animate the motion of an object along a path. [No Attributes]
nav_ :: forall html a. Html html => Array (html a) -> html a
Defines a navigation menu [No Attributes]
noscript_ :: forall html a. Html html => Array (html a) -> html a
Defines an alternate content for users that do not support client-side scripts [No Attributes]
object_ :: forall html a. Html html => Array (html a) -> html a
Defines a container for external application or interactive content [No Attributes]
ol_ :: forall html a. Html html => Array (html a) -> html a
Defines an ordered list [No Attributes]
optgroup_ :: forall html a. Html html => Array (html a) -> html a
Defines a group of related options in a drop-down list [No Attributes]
option_ :: forall html a. Html html => Array (html a) -> html a
Defines an option in a drop-down list [No Attributes]
output_ :: forall html a. Html html => Array (html a) -> html a
Defines the result of a calculation [No Attributes]
p_ :: forall html a. Html html => Array (html a) -> html a
Defines a paragraph [No Attributes]
pattern_ :: forall html a. Html html => Array (html a) -> html a
The pattern element defines a repeating pattern to be used as a fill or stroke. [No Attributes]
picture_ :: forall html a. Html html => Array (html a) -> html a
Defines a container for multiple image resources [No Attributes]
pre_ :: forall html a. Html html => Array (html a) -> html a
Defines preformatted text [No Attributes]
progress_ :: forall html a. Html html => Array (html a) -> html a
Represents the progress of a task [No Attributes]
q_ :: forall html a. Html html => Array (html a) -> html a
Defines a short quotation [No Attributes]
radialGradient_ :: forall html a. Html html => Array (html a) -> html a
The radialGradient element defines a radial gradient to be used as a fill or stroke. [No Attributes]
rb_ :: forall html a. Html html => Array (html a) -> html a
Defines a ruby base (character) for a ruby annotation [No Attributes]