Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
bobzhang committed Jun 17, 2024
1 parent ca55660 commit 100f8ab
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions immut/internal/sparse_array/sparse_array.mbti
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
package moonbitlang/core/immut/internal/sparse_array

// Values

// Types and methods
pub type Bitset Int
impl Bitset {
add(Self, Int) -> Self
has(Self, Int) -> Bool
index_of(Self, Int) -> Int
remove(Self, Int) -> Self
size(Self) -> Int
}

pub struct SparseArray {
pub elem_info : Bitset
pub data : FixedArray[X]
}
impl SparseArray {
add[X](Self[X], Int, X) -> Self[X]
has[X](Self[X], Int) -> Bool
iter[X](Self[X], (X) -> Unit) -> Unit
op_get[X](Self[X], Int) -> Option[X]
replace[X](Self[X], Int, X) -> Self[X]
singleton[X](Int, X) -> Self[X]
size[X](Self[X]) -> Int
}

// Traits

// Extension Methods

0 comments on commit 100f8ab

Please sign in to comment.