From: Eduardo Cavazos Date: Thu, 4 Dec 2008 19:10:19 +0000 (-0600) Subject: Add 'extra/sto' X-Git-Tag: 0.94~2293^2~19^2~3^2^2~1 X-Git-Url: https://gitweb.factorcode.org/gitweb.cgi?p=factor.git;a=commitdiff_plain;h=e7d11f3b9cb63773a4f78f800115318a75202783 Add 'extra/sto' --- diff --git a/extra/sto/sto.factor b/extra/sto/sto.factor new file mode 100644 index 0000000000..b43c9cc359 --- /dev/null +++ b/extra/sto/sto.factor @@ -0,0 +1,20 @@ + +USING: kernel lexer parser words quotations compiler.units ; + +IN: sto + +! Use 'sto' to bind a value on the stack to a word. +! +! Example: +! +! 10 sto A + +: sto + \ 1quotation parsed + scan + current-vocab create + dup set-word + literalize parsed + \ swap parsed + [ define ] parsed + \ with-compilation-unit parsed ; parsing