Hi,

In core/bootstrap/primitives.factor, change this line:

{ "call" "kernel" }

to

{ "(call)" "kernel" }

Then in core/kernel.factor, define a new word;

GENERIC: call ( quot -- )

M: quotation call (call) ;

M: f call drop ;

Then bootstrap. Everything should work.

Slava

On 21-Feb-07, at 10:09 AM, Eduardo Cavazos wrote:

> Slava,
>
> I'd like to experiment with redefining call as a generic word that can
> dispatch on quotations and other kinds of objects such as the  
> closures I
> wrote about recently. Do I need to bootstrap a new Factor with my  
> complex
> definition for call in place? Basically, I'd like to be able to  
> pass closures
> as well as quots to words that currently only accept quots. For  
> example, I'd
> like to pass a closure tuple to a button.
>
> If this is possible, it would be a neat demonstration of how  
> malleable Factor
> is.
>
> Do you have any advice?
>
> In the past I worked on a couple of lispish interpreters in Factor.  
> Being able
> to express closures in Factor makes translating lisp to Factor even  
> easier.
> So this is at least one application. ;-)
>
> Ed
>
> ---------------------------------------------------------------------- 
> ---
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to  
> share your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php? 
> page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Factor-talk mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/factor-talk


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to