/core/words/symbol/symbol.factor

http://github.com/abeaumont/factor · Factor · 14 lines · 8 code · 4 blank · 2 comment · 0 complexity · 073acf35a134e5d63f3296e1c2f6c56c MD5 · raw file

  1. ! Copyright (C) 2008 Slava Pestov.
  2. ! See http://factorcode.org/license.txt for BSD license.
  3. USING: accessors definitions kernel sequences words ;
  4. IN: words.symbol
  5. PREDICATE: symbol < word
  6. [ def>> ] [ [ ] curry ] bi sequence= ;
  7. M: symbol definer drop \ SYMBOL: f ;
  8. M: symbol definition drop f ;
  9. : define-symbol ( word -- )
  10. dup [ ] curry ( -- value ) define-inline ;