Search results
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]
sort :: forall a. Ord a => NonEmptyArray a -> NonEmptyArray a
sort :: forall a h. Ord a => STArray h a -> ST h (STArray h a)
Sort a mutable array in place. Sorting is stable: the order of equal elements is preserved.
sort :: forall a. Ord a => List a -> List a
Sort the elements of an list in increasing order.
sort :: forall a. Ord a => NonEmptyList a -> NonEmptyList a
sort :: URLSearchParams -> Effect Unit
sort :: forall r i. String -> IProp r i
sort :: forall a. ArrayView a -> Effect Unit
Sorts the values in-place.
sort :: forall s a. Ord a => Vec s a -> Vec s a
Sort a vector of Ords.
sort :: forall a. Ord a => OSet a -> OSet a
sort :: forall a. Ord a => Seq a -> Seq a
O(n*log(n)). Sort the sequence, using the sort from
Data.Sequence.Ordered. Note that this sorting algorithm is unstable.
sort :: forall f a. Functor f => Foldable f => Unfoldable f => Ord a => f a -> f a
Sort any structure (which has Foldable, Unfoldable, and Functor instances) by converting to an OrdSeq and back again. I am fairly sure this is usually O(n*log(n)), although of course this depends on the Unfoldable and Foldable instances.
Sort :: Usage
sort :: forall a. Ord a => ArrayView a -> ArrayView a
sort :: forall a. Ord a => NonEmptyArrayView a -> NonEmptyArrayView a
sort :: forall anything value. Ord value => Array value -> Array (Update anything)
Given an array of orderable elements, produce the array of incremental operations to sort them.
sort :: forall r. (r -> r -> Ordering) -> Query (DataFrame r) (DataFrame r)
Sort the rows of the dataframe by the given sorting function.
sort :: forall a. List (Stamped a) -> List (Stamped a)
Sort a list of Stamped records ascending chronologically.
sort :: Int -> Boolean -> Filter -> Effect Filter
Sorts the filtered range by the specified column, excluding the first row (the header row) in the range this filter is applied to.
sort :: Foreign -> Range -> Effect Range
Sorts the cells in the given range, by column and order specified.
sort :: Icons
sort :: forall a. Ord a => List a -> List a
Sort the elements of a list in increasing order, creating a new list.
Running time: O(n*log(n)).
sort :: forall a. Ord a => Array a -> SortedArray a
Sort an array and wrap it as a SortedArray.
sort :: URLSearchParams -> URLSearchParams
Sorts all key/value pairs, if any, by their keys.
sort :: URLSearchParams -> Effect Unit
Sort :: Foreign -> Sort
sort :: forall r a (mode :: Type). Expr r a => Z3 r mode (Z3Sort r a)
sort represents the type of a Z3 expression
sortBy :: forall a. (a -> a -> Ordering) -> Array a -> Array a
Sort the elements of an array in increasing order, where elements are compared using the specified partial ordering, creating a new array. Sorting is stable: the order of elements is preserved if they are equal according to the specified partial ordering.
compareLength a b = compare (length a) (length b)
sortBy compareLength [[1, 2, 3], [7, 9], [-2]] = [[-2],[7,9],[1,2,3]]
sortBy :: forall a. (a -> a -> Ordering) -> NonEmptyArray a -> NonEmptyArray a
sortBy :: forall a h. (a -> a -> Ordering) -> STArray h a -> ST h (STArray h a)
Sort a mutable array in place using a comparison function. Sorting is stable: the order of elements is preserved if they are equal according to the comparison function.
sortBy :: forall a. (a -> a -> Ordering) -> List a -> List a
Sort the elements of a list in increasing order, where elements are compared using the specified ordering.
sortBy :: forall a. (a -> a -> Ordering) -> NonEmptyList a -> NonEmptyList a
sortBy :: forall s a. (a -> a -> Ordering) -> Vec s a -> Vec s a
Sort a vector using an ordering function.
Sorted :: forall a. (Array a) -> ModuleSort a
sortBy :: forall a. (a -> a -> Ordering) -> OSet a -> OSet a
sortBy :: forall a. (a -> a -> Ordering) -> ArrayView a -> ArrayView a
sortBy :: forall a. (a -> a -> Ordering) -> NonEmptyArrayView a -> NonEmptyArrayView a
sortBy :: forall anything value. (value -> value -> Ordering) -> Array value -> Array (Update anything)
Given an array, and a comparison function, produce the set of incremental operations required to sort the array.
sortBy :: String -> Collection -> Promise (Array Foreign)
Same as toArray but with manual sorting applied to the array. Similar to orderBy but does sorting on the resulting array rather than letting the backend implementation do the sorting.
Documentation: dexie.org/docs/Collection/Collection.sortBy()
sortBy :: PivotValue -> (Array Foreign) -> PivotGroup -> Effect PivotGroup
Sorts this group by the specified PivotValue for the values from the oppositeGroupValues.
sortBy :: forall a. (a -> a -> Ordering) -> List a -> List a
Sort the elements of a list in increasing order, where elements are compared using the specified partial ordering, creating a new list.
Running time: O(n*log(n)).
sorted :: forall a f. Ord a => Foldable f => Sorting -> Constraint (f a)
sortOn :: forall a b. Ord b => (a -> b) -> Array a -> Array a
Sort a list by a projection.
sortOn (\x -> if x == "dog" then 2 else 1) ["apple", "dog", "kiwi"] = ["apple", "kiwi", "dog"]
sortOn' :: forall a b. Ord b => (a -> b) -> Array a -> Array a
Sort a list by a projection.
This version of sortOn uses the decorate-sort-undecorate paradigm or Schwartzian transform. Which means the projection for each entry will only be computed once at the cost of creating more data structures. You will have to benchmark your specific situation to find out whether sortOn or sortOn' is faster.
sortOn' (\x -> if x == "dog" then 2 else 1) ["apple", "dog", "kiwi"] = ["apple", "kiwi", "dog"]
sortWith :: forall a b. Ord b => (a -> b) -> Array a -> Array a
Sort the elements of an array in increasing order, where elements are sorted based on a projection. Sorting is stable: the order of elements is preserved if they are equal according to the projection.
sortWith (_.age) [{name: "Alice", age: 42}, {name: "Bob", age: 21}]
= [{name: "Bob", age: 21}, {name: "Alice", age: 42}]
sortWith :: forall a b. Ord b => (a -> b) -> NonEmptyArray a -> NonEmptyArray a
sortWith :: forall a b h. Ord b => (a -> b) -> STArray h a -> ST h (STArray h a)
Sort a mutable array in place based on a projection. Sorting is stable: the order of elements is preserved if they are equal according to the projection.