File:Omni.png

Licensing

I, the copyright holder of this work, hereby publish it under the following license:
This work is licensed under a
License::Creative Commons Attribution-ShareAlike 3.0 Unported License
Credit:
gollark: ***OpenCL***
gollark: I wanted a hyperapp-like state management thing with no view for skynet (it's a long story...) so I made this, because Javascript microlibraries are trendy.```javascriptconst R = require("ramda")module.exports = (initialState, actions, context = {}, expose) => { let state = initialState const wired = R.map(action => (...args) => { const result = action(...args)(state, actions, context) if (typeof result === "object") { state = R.merge(state, result) } }, actions) if ("init" in wired) { wired.init() } if (expose) { return R.pick(expose, wired) } else { return wired }}```
gollark: Er, how do I uninvert it?
gollark: It's to help users by emphasising the idiomatic bottom-up approach involving making programs from small composable functions.
gollark: Ours is upside-down, though.
This article is issued from Dandwiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.