Search results

elem :: forall a f. Foldable f => Eq a => a -> f a -> Boolean

Test whether a value is an element of a data structure.

notElem :: forall a f. Foldable f => Eq a => a -> f a -> Boolean

Test whether a value is not an element of a data structure.

contains :: forall b a. HasEqual b => HasReduce a => b -> a b -> Boolean

Returns true if the container contains the element.

[1, 2, 3] :contains 2 -- true
[1, 0, 3] :contains 2 -- false
elem :: forall a. Eq a => a -> Array a -> Boolean

Returns true if the array has the given element.

elem :: forall a. Eq a => a -> NonEmptyArray a -> Boolean
notElem :: forall a. Eq a => a -> Array a -> Boolean

Returns true if the array does not have the given element.

notElem :: forall a. Eq a => a -> NonEmptyArray a -> Boolean
member :: forall a. Ord a => a -> Set a -> Boolean

Test if a value is a member of a set

member :: forall a. Ord a => a -> NonEmptySet a -> Boolean

Test if a value is a member of a set.

member :: forall a. Hashable a => a -> HashSet a -> Boolean

Test whether a value is in a set.

canFindEq :: forall a. Eq a => a -> Array a -> Boolean
canFindEq :: forall a. Eq a => a -> Vector a -> Boolean
eq :: forall n. Eq n => n -> Bound n -> Boolean
greaterThan :: forall n. Ord n => n -> Bound n -> Boolean
greaterThanOrEq :: forall n. Ord n => n -> Bound n -> Boolean
lessThan :: forall n. Ord n => n -> Bound n -> Boolean
lessThanOrEq :: forall n. Ord n => n -> Bound n -> Boolean
member :: forall n. Ord n => n -> Interval n -> Boolean
member :: forall a. Hashable a => a -> MultiSet a -> Boolean
notEq :: forall n. Eq n => n -> Bound n -> Boolean
contains :: forall a. Ord a => a -> Range a -> Boolean

Returns whether the range contains value a

contains :: forall a. Ord a => a -> Interval a -> Boolean

Whether a point falls within the interval (half-open: start <= x < end).

equals :: forall a. a -> EqPred a -> Boolean
member :: forall a. Ord a => a -> IntervalSet a -> Boolean

Whether a point is contained in any interval in the set. O(log n).

unsafeHas :: forall r1. String -> Record r1 -> Boolean

Checks if a record has a key, using a string for the key.

member :: forall a. String -> Object a -> Boolean

Test whether a String appears as a key in a map

lookupTag :: String -> List String -> Boolean

A specialized lookup function which bails early. Foldable's elem is always worst-case.

inBounds :: forall a. Int -> Seq a -> Boolean

O(1). True if the given index specifies an element that exists in the sequence, false otherwise.

inBounds :: forall a. Int -> Seq a -> Boolean

O(1). True if the given index specifies an element that exists in the sequence, false otherwise.

existsAt :: forall a. Path -> Tree a -> Boolean

If the tree contains something at given path. |

hasSubUnits :: forall c. Int -> Money c -> Boolean

Check if the amount has fractional minor units at the given scale. e.g. hasSubUnits 100 (fromCents 1050) is true (10.50 has sub-units), hasSubUnits 100 (fromCents 1000) is false (10.00 has none).

isEqualTo :: forall a. RoomPosition -> TargetPosition a -> Boolean
isNearTo :: forall a. RoomPosition -> TargetPosition a -> Boolean
sectionContains :: forall a. Section -> Cell a -> Boolean

The sectionContains function tells if a section contains a cell.

fullscreen :: P5 -> (Maybe Boolean) -> Boolean

p5js.org documentation

isEnum :: String -> List TypeDefinition -> Boolean
isInEnumValuesDefinition :: String -> List EnumValueDefinition -> Boolean
isProbablePrime :: BigInt -> Maybe Int -> Boolean
isScalar :: String -> List TypeDefinition -> Boolean
intercalate :: forall f m. Foldable f => Monoid m => m -> f m -> m

Fold a data structure, accumulating values in some Monoid, combining adjacent elements using the specified separator.

For example:

> intercalate ", " ["Lorem", "ipsum", "dolor"]
= "Lorem, ipsum, dolor"

> intercalate "*" ["a", "b", "c"]
= "a*b*c"

> intercalate [1] [[2, 3], [4, 5], [6, 7]]
= [2, 3, 1, 4, 5, 1, 6, 7]
intercalate :: forall f m. Foldable1 f => Semigroup m => m -> f m -> m

Fold a data structure using a Semigroup instance, combining adjacent elements using the specified separator.

surround :: forall f m. Foldable f => Semigroup m => m -> f m -> m

fold but with each element surrounded by some fixed value.

For example:

> surround "*" []
= "*"

> surround "*" ["1"]
= "*1*"

> surround "*" ["1", "2"]
= "*1*2*"

> surround "*" ["1", "2", "3"]
= "*1*2*3*"
consMax :: forall a f. Foldable f => Ord a => a -> f a -> a
consMin :: forall a f. Foldable f => Ord a => a -> f a -> a
fromMaybe :: forall a. a -> Maybe a -> a

Takes a default value, and a Maybe value. If the Maybe value is Nothing the default value is returned, otherwise the value inside the Just is returned.

fromMaybe x Nothing == x
fromMaybe x (Just y) == y
intercalate :: forall a. Monoid a => a -> Array a -> a
intercalate :: forall a. Semigroup a => a -> NonEmptyArray a -> a
peek :: forall s w a. ComonadStore s w => s -> w a -> a
track :: forall t w a. ComonadTraced t w => t -> w a -> a
fromUndefinedOr :: forall a. a -> UndefinedOr a -> a
fromOpt :: forall a. a -> Opt a -> a

Let's be consistent with fromMaybe args order here

xpose :: forall a. Semiring a => a -> Polynomial a -> a
buildLeaf :: forall e f p v. ElementBuilder e f p v => e -> f p -> v
fromMaybeChurch :: forall a. a -> MaybeChurch a -> a
withDefault :: forall a. a -> Maybe a -> a

If the given value is Nothing, return the default. Otherwise return the value.

withDefault 2 Nothing -- 2
withDefault 2 (Just 1) -- 1
eq1 :: forall f a. Eq1 f => Eq a => f a -> f a -> Boolean
notEq1 :: forall f a. Eq1 f => Eq a => f a -> f a -> Boolean
member :: forall k v. Ord k => k -> Map k v -> Boolean

Test if a key is a member of a map

default :: forall a r. a -> Variant r -> a

Combinator for partial matching with a default value in case of failure.

caseFn :: forall r. Variant (foo :: Int, bar :: String | r) -> String
caseFn = default "No match"
 # on (Proxy :: Proxy "foo") (\foo -> "Foo: " <> show foo)
 # on (Proxy :: Proxy "bar") (\bar -> "Bar: " <> bar)
withEvent :: forall e a. Eventable e a => a -> EventHandlers e -> a

Add an event handler to a markup node.

member :: forall k v. Hashable k => k -> HashMap k v -> Boolean

Test whether a key is in a map.

hasNode :: forall node weight. Ord node => node -> WeightedDigraph node weight -> Boolean

Check if a node exists in the graph

prj :: forall size a n' n t'' t' t. TupleSize size t => Lt n size => ShowNat n n' => ListToRow t t' => Cons n' a t'' t' => Nat n => n -> TupleN t -> a

Project a value of index n from a TupleN, using Data.TypeLevel.Num.Reps.dN as Nat values.

set :: forall @n a b. Set n a b => a -> Polynomial b -> b
isMember :: forall x xs r lproxy. IsMember x xs r => Proxy x -> lproxy xs -> Boolean
eq1 :: forall f a. Eq1 f => f a -> f a -> Boolean
equal :: forall r l f. REqual f l r => RowToList r l => f r -> f r -> Boolean
greaterThan1 :: forall f a. Ord1 f => f a -> f a -> Boolean
greaterThanOrEq1 :: forall f a. Ord1 f => f a -> f a -> Boolean
isInCycle :: forall v k. Ord k => k -> Graph k v -> Boolean

Checks if given key is part of a cycle.

lessThan1 :: forall f a. Ord1 f => f a -> f a -> Boolean
lessThanOrEq1 :: forall f a. Ord1 f => f a -> f a -> Boolean
member :: forall k v. EncodeKey k => k -> Map k v -> Boolean
member :: forall k v. Key k => k -> Map k v -> Boolean

Test whether a key appears in a map

notEq1 :: forall f a. Eq1 f => f a -> f a -> Boolean
sameElements :: forall a f. Foldable f => Eq a => f a -> f a -> Boolean

Checks if two arrays have exactly the same elements. The order of elements does not matter.

sameElements ["A", "B", "B"] ["B", "A", "B"] == true
sameElements ["A", "B", "B"] ["A", "B"] == false
typeVarKinded :: forall a e name. TypeVar a e => ToName name Ident => name -> Type e -> a

An overloaded constructor for kinded type variables.

apply :: forall b a f. f -> Array a -> b
elem :: forall w a. Ord a => a -> Graph a w -> Boolean

Test whether a vertex is in a graph.

isLongerThan :: forall b a t2 t1. Unconsable t1 => Unconsable t2 => t1 a -> t2 b -> Boolean

Checks whether the first list is longer than the second.

isOfSameLength :: forall b a t2 t1. Unconsable t1 => Unconsable t2 => t1 a -> t2 b -> Boolean

Checks whether two lists are of the same length.

isShorterThan :: forall b a t2 t1. Unconsable t1 => Unconsable t2 => t1 a -> t2 b -> Boolean

Checks whether the first list is shorter than the second.

member :: forall k v. Newtype k String => k -> ObjectMap k v -> Boolean
member :: forall k v. EncodeJson k => k -> ObjectMap k v -> Boolean
member :: forall v k. Hashable k => k -> HashMap k v -> Boolean
withEvent :: forall e a. Eventable e a => a -> EventHandlers e -> a

Add an event handler to a markup node.

unsafeGet :: forall r a. String -> Record r -> a

Unsafely gets a value from a record, using a string for the key.

If the key does not exist this will cause a runtime error elsewhere.

properSubset :: forall a. Ord a => Set a -> Set a -> Boolean

True if and only if the first set is a subset of the second set and the sets are not equal

properSubset :: forall a. Ord a => NonEmptySet a -> NonEmptySet a -> Boolean

True if and only if the first set is a subset of the second set and the sets are not equal.

subset :: forall a. Ord a => Set a -> Set a -> Boolean

True if and only if every element in the first set is an element of the second set

subset :: forall a. Ord a => NonEmptySet a -> NonEmptySet a -> Boolean

True if and only if every element in the first set is an element of the second set.

equal :: forall r rs. RowToList r rs => EqualFields rs r => Record r -> Record r -> Boolean

Check two records of the same type for equality.

isSubmap :: forall a. Eq a => Object a -> Object a -> Boolean

Test whether one map contains all of the keys and values contained in another map

unsafeGetCell :: forall a. Int -> Array a -> a
unsafeGetField :: forall r a. String -> Record r -> a

Unsafe field access (we've verified types at compile time)

properSubset :: forall a. Eq a => OSet a -> OSet a -> Boolean
subset :: forall a. Eq a => OSet a -> OSet a -> Boolean
contains :: String -> Map CaseInsensitiveString String -> Boolean
eqEverywhere :: forall a. Ord a => NonEmpty a -> NonEmpty a -> Boolean
eqStableName :: forall b a. StableName a -> StableName b -> Boolean

Equality on 'StableName' that does not require that the types of the arguments match.