cometia0/messenger-core/1.0.0

NOTE: the latest version is 2.0.0

Messenger.RecursionArray

RecursionArray

Array implementation for the recursion algorithm

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

Recursively update all the objects in the List

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 : Matcher a d -> d -> Array a -> List Int

Get the indices of the objects that match the target

getObjectIndex : Matcher a d -> d -> Array a -> Maybe Int

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

TODO: use better algorithm

getObjects : Matcher a d -> d -> Array a -> Array a

Get the objects that match the target

getObject : Matcher a d -> d -> Array a -> Maybe a

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