]> gitweb.factorcode.org Git - factor.git/blob - core/words/constant/constant.factor
Merge qualified, alias, symbols, constants into core
[factor.git] / core / words / constant / constant.factor
1 ! Copyright (C) 2008 Slava Pestov.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: accessors kernel sequences words ;
4 IN: words.constant
5
6 PREDICATE: constant < word ( obj -- ? )
7     def>> dup length 1 = [ first word? not ] [ drop f ] if ;
8
9 : define-constant ( word value -- )
10     [ ] curry (( -- value )) define-inline ;