site.fabricate.prototype.fsm Namespace

Namespace for defining finite schema machines. A finite schema machine is a method of organizing the functions to be called in a program by the state of the data passing through the program. Those states are defined using malli schemas.

It is similar in concept to the idea of a state-action behavior in Leslie Lamport's 2008 paper 'Computation and State Machines', but the formalism is not as rigorous.

For background on the concepts informing this design, please see Organizing Computation With Finite Schema Machines.

Functions


Error
Error type
class clojure.lang.Compiler$CompilerException
Error message
No such var: page/expr->hiccup
Error phase
:compile-syntax-check
Location
Lines 23-37, Columns 1-28
Source expression
 [:div (->> vars
         (filter (fn [[k v]] (fn? (var-get v))))
         (reduce (fn [l [k v]]
(conj l [:dt [:code {:class "language-clojure symbol"} k]]
      [:dd [:dl
            [:dt "Description" ]
            [:dd (:doc (meta v))]
            [:dt "Arguments"]
            [:dd
             (apply conj [:ul {:style (garden/style {:list-style-type "none"})}]
                    (map (fn [a]
                           [:li [:code {:class "language-clojure"}
                                 (page/expr->hiccup a)]])
                         (:arglists (meta v))))]]]))
                 [:dl]))]


Constants


Error
Error type
class clojure.lang.Compiler$CompilerException
Error message
No such var: page/expr->hiccup
Error phase
:compile-syntax-check
Location
Lines 41-48, Columns 1-28
Source expression
 [:div (->> vars
         (filter (fn [[k v]] (not (fn? (var-get v)))))
         (reduce (fn [l [k v]]
(conj l [:dt [:code {:class "language-clojure symbol"} k]]
      [:dd [:dl [:dt "Description"] [:dd (:doc (meta v))]
            [:dt "Type"]
            [:dd [:code (page/expr->hiccup (type (var-get v)))]]]]))
                 [:dl]))]