linsyking / messenger-core / Messenger.Recursion

Recursion

This module provides the signature for the updater


type alias Updater a b c d =
a -> c -> ( a, List ( d, b ), c )

The updater a: message sender (object) b: message c: environment messages d: target


type alias Matcher a d =
a -> d -> Basics.Bool

Return true if the target is the sender (second argument)


type alias Super d =
d -> Basics.Bool

Return true if the target is the parent


type alias Cleaner c =
c -> c

Clean the environment


type alias Patcher c =
c -> c -> c

Patch the environment


type alias RecBody a b c d =
{ update : Updater a b c d
, updaterec : RecUpdater a b c d
, match : Matcher a d
, super : Super d
, clean : Cleaner c
, patch : Patcher c 
}

RecBody type.

Pass this as an argument to the updater