chouzar / chip

Registry library for gleam
15 stars 2 forks source link

Add a `groups` function #11

Open chouzar opened 3 days ago

chouzar commented 3 days ago

Have a helper to retrieve all groups in the registry:

/// Retrieves all groups on the registry.
/// 
/// ## Example
/// 
/// ```gleam
/// let assert Ok(registry) = chip.start()
/// 
/// let assert [_group, ..groups] = chip.groups(registry)
/// ```
pub fn groups(registry: Registry(msg, tag, group)) -> List(group) {
  // TODO: May be obtained from ETS directly
  todo
}