diff --git a/basis/specialized-arrays/direct/functor/functor.factor b/basis/specialized-arrays/direct/functor/functor.factor index 2cde26b731..14fb739947 100755 --- a/basis/specialized-arrays/direct/functor/functor.factor +++ b/basis/specialized-arrays/direct/functor/functor.factor @@ -20,7 +20,7 @@ SET-NTH [ T dup c-setter array-accessor ] WHERE TUPLE: A -{ underlying alien read-only } +{ underlying c-ptr read-only } { length fixnum read-only } ; : ( alien len -- direct-array ) A boa ; inline 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