Skip to content

Commit

Permalink
Add Ordered Set and Bag as options
Browse files Browse the repository at this point in the history
  • Loading branch information
chouzar committed Dec 12, 2024
1 parent 5986f1e commit c5a885e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/lamb.gleam
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ type Name =

pub type Kind {
Set
OrderedSet
Bag
DuplicateBag
}

pub type Access {
Expand Down Expand Up @@ -144,8 +146,8 @@ pub type Step

pub fn lookup(from table: Table(index, record), is index: index) -> List(record) {
case table.kind {
Set -> ffi_lookup_set(table.reference, index)
Bag -> ffi_lookup_bag(table.reference, index)
Set | OrderedSet -> ffi_lookup_set(table.reference, index)
Bag | DuplicateBag -> ffi_lookup_bag(table.reference, index)
}
}

Expand Down

0 comments on commit c5a885e

Please sign in to comment.