cometia0/messenger-core/2.0.0

Messenger.RecursionList

RecursionList

List implementation for the recursion algorithm

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

Recursively update all the objects in the List

RecBody a b c d
-> c
-> List ( d, b )
-> List a
-> ( List a, List b, c )

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

Tools

getObjectByIndex : Int -> List a -> Maybe a

Get the object by index

getObjectIndices : Matcher a d -> d -> List a -> List Int

Get the indices of the objects that match the target

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

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

getObjects : Matcher a d -> d -> List a -> List a

Get the objects that match the target

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

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

RecBody a b c d
-> c
-> b
-> Int
-> List a
-> ( List a, List ( d, b ), c )

Update the object by index

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

Update all the objects that match the target