pub enum HigherOrderOp {
Show 14 variants
Map,
Filter,
FoldlP1,
FoldlP2,
Sort,
GenList,
ConcatMap,
Any,
All,
Partition,
GroupBy,
MapAttrs,
FilterAttrs,
Elem,
}Expand description
Tag identifying which higher-order operation a partially-applied builtin represents.
Variants§
Map
map f list – apply f to each element
Filter
filter pred list – keep elements where pred returns true
FoldlP1
foldl' f init – strict left fold (first partial: has f only)
FoldlP2
foldl' f init list – strict left fold (second partial: has f + init)
Sort
sort comparator list – sort using comparator function
GenList
genList f n – generate list by calling f(0)..f(n-1)
ConcatMap
concatMap f list – map then concatenate results
Any
any pred list – true if any element satisfies pred
All
all pred list – true if all elements satisfy pred
Partition
partition pred list – split into { right, wrong }
GroupBy
groupBy f list – group elements by f result
MapAttrs
mapAttrs f attrs – apply f to each attr value
FilterAttrs
filterAttrs pred attrs – keep attrs where pred name value is true
Elem
elem needle list – check if needle is in list (needs VM to force elements)
Trait Implementations§
Source§impl Clone for HigherOrderOp
impl Clone for HigherOrderOp
Source§fn clone(&self) -> HigherOrderOp
fn clone(&self) -> HigherOrderOp
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for HigherOrderOp
Source§impl Debug for HigherOrderOp
impl Debug for HigherOrderOp
impl Eq for HigherOrderOp
Source§impl PartialEq for HigherOrderOp
impl PartialEq for HigherOrderOp
impl StructuralPartialEq for HigherOrderOp
Auto Trait Implementations§
impl Freeze for HigherOrderOp
impl RefUnwindSafe for HigherOrderOp
impl Send for HigherOrderOp
impl Sync for HigherOrderOp
impl Unpin for HigherOrderOp
impl UnsafeUnpin for HigherOrderOp
impl UnwindSafe for HigherOrderOp
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.