linsyking / messenger-core / Messenger.RecursionArray

RecursionArray

Array implementation for the recursion algorithm

updateObjects : Messenger.Recursion.RecBody a b c d -> c -> Array a -> ( Array a, List b, c )

Recursively update all the objects in the List

updateObjectsWithTarget : Messenger.Recursion.RecBody a b c d -> c -> List ( d, b ) -> Array a -> ( Array a, List b, c )

Recursively update all the objects in the Array, but also uses target

Tools

getObjectIndices : Messenger.Recursion.Matcher a d -> d -> Array a -> List Basics.Int

Get the indices of the objects that match the target

getObjectIndex : Messenger.Recursion.Matcher a d -> d -> Array a -> Maybe Basics.Int

Get the index of the object that matches the target (the first one)

TODO: use better algorithm

getObjects : Messenger.Recursion.Matcher a d -> d -> Array a -> Array a

Get the objects that match the target

getObject : Messenger.Recursion.Matcher a d -> d -> Array a -> Maybe a

Get the object that matches the target (the first one)