PageRenderTime 36ms CodeModel.GetById 29ms app.highlight 3ms RepoModel.GetById 2ms app.codeStats 0ms

/core/words/symbol/symbol.factor

http://github.com/abeaumont/factor
Unknown | 14 lines | 10 code | 4 blank | 0 comment | 0 complexity | 073acf35a134e5d63f3296e1c2f6c56c MD5 | raw file
 1! Copyright (C) 2008 Slava Pestov.
 2! See http://factorcode.org/license.txt for BSD license.
 3USING: accessors definitions kernel sequences words ;
 4IN: words.symbol
 5
 6PREDICATE: symbol < word
 7    [ def>> ] [ [ ] curry ] bi sequence= ;
 8
 9M: symbol definer drop \ SYMBOL: f ;
10
11M: symbol definition drop f ;
12
13: define-symbol ( word -- )
14    dup [ ] curry ( -- value ) define-inline ;