Hi all,
Joe added a new word to the namespaces vocab:
: initialize ( name quot -- )
It encapsulates a common idiom where you want to set a global variable
in a top-level form but only if it hasn't been set before. People
would re-invent various ways of doing this all over the library:
foo global [
H{ } clone or
] change-at
foo global [
[ H{ } clone ] unless*
] change-at
foo global [
H{ } assoc-like
] change-at
foo get-global [
H{ } clone foo set-global
] unless
... and so on. Now you just write
foo [ H{ } clone ] initialize
Slava
------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk