On Thu, Nov 18, 2010 at 4:26 PM, Shaping <shap...@charter.net> wrote:
>
> I was looking for a definition.  "quot:" does not seem to behave like a
> word or literal.  "quot:" occurs only once on the above page in an example
> of a row-polymorphic combinator, but is not defined.  However, "quot" is
> mentioned briefly in the table of 13 "names":
>
There's no documentation for "quot:" because, just like other names in a
stack effect without the colon, the name "quot" doesn't mean anything except
as documentation for the human reader. The ":" at the end indicates that
it's followed by a nested stack effect declaration. From the linked "Stack
effects" documentation:

--
Parameters which are quotations can be declared by suffixing the parameter
name with : and then writing a nested stack effect declaration.
--

A word could be defined with the following stack effects and the behavior
would be the same:

--
: foo ( a quot -- )
: foo ( apples bananas -- )
: foo ( !...@# @#$ -- )
--

Likewise, with nested stack effect checking, the following are equivalent:

--
: bar ( a quot: ( b -- ) -- )
: bar ( apples bananas: ( pears -- ) -- )
: bar ( !...@# @#$: ( #$% -- ) -- )
--

-Joe
------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
_______________________________________________
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to