README

tonyfettes/giraffe/sub does not have a README file

#
Cmd

pub enum Cmd[Sub] {
Insert(Sub)
Modify(old~ : Sub, new~ : Sub)
Remove(Sub)
}

#
Cmd::map

fn[T, U] Cmd::map(self : Cmd[T], map : (T) -> U) -> Cmd[U]

#
Subscribe

pub(all) struct Subscribe[Model, Message]((Model, (Message) -> Unit) -> Unit)

#
Subscribe::new

fn[Model, Msg, Sub] Subscribe::new(subscribe : (Model) -> Map[String, Sub], manage : (Cmd[Sub], (Msg) -> Unit) -> Unit) -> Subscribe[Model, Msg]

A single subscription source: a function that extracts a keyed map of subscriptions from the model, paired with a manage handler that processes Insert/Modify/Remove commands. Compose multiple sources into one app-level Subscribe with subscribe.

#
subscribe

fn[Model, Msg] subscribe(subs : Array[Subscribe[Model, Msg]]) -> Subscribe[Model, Msg]

Combine multiple sources into one Subscribe for the app. Each inner source keeps its own diff state and runs independently, so communication between sources flows through Model rather than between subscriptions.

Source Files

Powered by MoonBit

Site sourceReport issuePackagesBuild queueSkillsStatistics

© 2026 mooncakes.io