webbhuset/elm-actor-model/2.0.1

NOTE: the latest version is 4.0.0

Webbhuset.PID.Set

Set of PID

Since PIDs are not comparable they can not be used with the Set in elm/core.

When using an event/observer pattern in the actor model it is useful to gather PIDs that are observing an event in a Set.

type Set

Store PIDs in a Set

type alias PID =
PID

A PID is an identifier for a Process.

A process is an instance of an Actor / Component

Create an empty set

insert : PID -> Set -> Set

Insert PID in a Set

isEmpty : Set -> Bool

Check if a Set is empty.

remove : PID -> Set -> Set

Remove a PID from a Set

toList : Set -> List PID

Get all pids as a List