Skip to content

Instantly share code, notes, and snippets.

@ELLIOTTCABLE
Created July 15, 2011 04:39
Show Gist options
  • Save ELLIOTTCABLE/1084080 to your computer and use it in GitHub Desktop.
Save ELLIOTTCABLE/1084080 to your computer and use it in GitHub Desktop.
# Empty noughtie on `<me>`:
infrastructure list affix () () (infrastructure list create ())
# /// (())
# First element on `<me>`, a pairing of “child” with
# an execution. (with a noughtie for the pairing itself):
infrastructure list affix () () (infrastructure list create ())
infrastructure list affix () (infrastructure list get () () 1) (infrastructure list create ())
# /// ( (), (()) )
infrastructure list affix () (infrastructure list get () () 1) child
infrastructure list affix () (infrastructure list get () () 1) {
infrastructure list affix () () (infrastructure list create ())
infrastructure list affix () (infrastructure list get () () 2) (infrastructure list create ())
infrastructure list affix () (infrastructure list get () () 2) caller
infrastructure list affix () (infrastructure list get () () 2) (infrastructure execution unstage ())
infrastructure execution stage () (caller) 42
}
# /// ( (), ((), “child”, { … }) )
# ### Providing access to `infrastructure` inside `child`
# Empty noughtie on `child`:
infrastructure list affix () (child) (infrastructure list create ())
# /// { … #(())}
# First element on `child`
infrastructure list affix () (child) (infrastructure list create ())
infrastructure list affix () (infrastructure list get () (child) 1) (infrastructure list create ())
# /// { … #( (), (()) )}
infrastructure list affix () (infrastructure list get () (child) 1) infrastructure
infrastructure list affix () (infrastructure list get () (child) 1) (infrastructure)
# /// { … #( (), ((), “infrastructure”, <infra-list>) )}
# ### Priming the `child` execution
infrastructure execution stage () (child) ()
infrastructure list affix () () (infrastructure list create ())
infrastructure list affix () (infrastructure list get () () 2) (infrastructure list create ())
# /// ( (), ( … ), (()) )
infrastructure list affix () (infrastructure list get () () 2) parent
infrastructure list affix () (infrastructure list get () () 2) {
infrastructure list affix () () (infrastructure list create ())
infrastructure list affix () (infrastructure list get () () 2) (infrastructure list create ())
infrastructure list affix () (infrastructure list get () () 2) caller
infrastructure list affix () (infrastructure list get () () 2) (infrastructure execution unstage ())
infrastructure hack print () ( caller child () )
infrastructure execution stage () (caller) meh
}
# /// ( (), ( … ), ((), “parent”, { … }) )
infrastructure list affix () (parent) (infrastructure list create ())
infrastructure list affix () (parent) (infrastructure list create ())
infrastructure list affix () (infrastructure list get () (parent) 1) (infrastructure list create ())
infrastructure list affix () (infrastructure list get () (parent) 1) infrastructure
infrastructure list affix () (infrastructure list get () (parent) 1) (infrastructure)
# ### Priming the `parent` execution
infrastructure execution stage () (parent) ()
parent ()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment