Sign in

    immut_deque

    immutable double ended queue

    functional-programming
    data-structure
    deque
    Download zip
    Version
    0.3.4
    License
    Apache-2.0
    Last updated
    last year
    Downloads
    45

    No dependencies

    #immutable deque

    double ended queue (aka Dequeue or Deque) based on cons list and snoc list.

    The implementation of this deque refers to the Hasekll implementation deque

    type T[A]

    impl Show for T[A]

    T::append

    fn[A] T::append(self : T[A], other : T[A]) -> T[A]
    fnalias T::append

    T::bind

    fn[A, B] T::bind(self : T[A], k : (A) -> T[B]) -> T[B]
    fnalias T::bind

    T::cons

    fn[A] T::cons(self : T[A], x : A) -> T[A]
    fnalias T::cons

    T::drop

    fn[A] T::drop(self : T[A], n : Int) -> T[A]
    fnalias T::drop

    T::dropWhile

    fn[A] T::dropWhile(self : T[A], f : (A) -> Bool) -> T[A]
    fnalias T::dropWhile

    T::empty

    fn[A] T::empty() -> T[A]
    fnalias T::empty

    T::filter

    fn[A] T::filter(self : T[A], f : (A) -> Bool) -> T[A]
    fnalias T::filter

    T::filter_map

    fn[A, B] T::filter_map(self : T[A], f : (A) -> B?) -> T[B]
    fnalias T::filter_map

    T::foldl

    fn[A, B] T::foldl(self : T[A], z : B, f : (B, A) -> B) -> B
    fnalias T::foldl

    T::foldr

    fn[A, B] T::foldr(self : T[A], z : B, f : (B, A) -> B) -> B
    fnalias T::foldr

    T::from_iter

    fn[A] T::from_iter(xs : Iter[A]) -> T[A]
    fnalias T::from_iter

    T::from_list

    fn[A] T::from_list(xs :
    List
    [A]) -> T[A]
    fnalias T::from_list

    T::from_rev_list

    fn[A] T::from_rev_list(xs :
    List
    [A]) -> T[A]
    fnalias T::from_rev_list

    T::head

    fn[A] T::head(self : T[A]) -> A?
    fnalias T::head

    T::init_

    fn[A] T::init_(self : T[A]) -> T[A]
    fnalias T::init_

    T::iter

    fn[A] T::iter(self : T[A]) -> Iter[A]
    fnalias T::iter

    T::join

    fn[A] T::join(self : T[T[A]]) -> T[A]
    fnalias T::join

    T::last

    fn[A] T::last(self : T[A]) -> A?
    fnalias T::last

    T::map

    fn[A, B] T::map(self : T[A], f : (A) -> B) -> T[B]
    fnalias T::map

    T::of

    fn[A] T::of(xs : FixedArray[A]) -> T[A]
    fnalias T::of

    T::rev_iter

    fn[A] T::rev_iter(self : T[A]) -> Iter[A]
    fnalias T::rev_iter

    T::reverse

    fn[A] T::reverse(self : T[A]) -> T[A]
    fnalias T::reverse

    T::singleton

    fn[A] T::singleton(x : A) -> T[A]
    fnalias T::singleton

    T::snoc

    fn[A] T::snoc(self : T[A], x : A) -> T[A]
    fnalias T::snoc

    T::tail

    fn[A] T::tail(self : T[A]) -> T[A]
    fnalias T::tail

    T::take

    fn[A] T::take(self : T[A], n : Int) -> T[A]
    fnalias T::take

    T::takeWhile

    fn[A] T::takeWhile(self : T[A], f : (A) -> Bool) -> T[A]
    fnalias T::takeWhile

    T::to_array

    fn[A] T::to_array(self : T[A]) -> Array[A]
    fnalias T::to_array

    T::uncons

    fn[A] T::uncons(self : T[A]) -> (A, T[A])?
    fnalias T::uncons

    T::unsnoc

    fn[A] T::unsnoc(self : T[A]) -> (A, T[A])?
    fnalias T::unsnoc

    Powered by MoonBit

    Site sourceReport issuePackagesBuild queueSkillsStatistics

    © 2026 mooncakes.io