Slava,
It would be nice if the default BOA-style constructors for tuples are always
available even if the user provides a custom constructor.
For example:
TUPLE: point x y z ;
C: point ... ;
So even though the user specified a custom constructor with special behaviour,
the si
Hello,
Below is an implementation of closures with parameters. Some examples are
below.
The example transcript was made with my listener mod. So after each line of
input, you'll see the output which is laid out like this:
<<>>
--
<<>>
--
<<>>
!
Why the variables? All you really need for closures is curry, and
possibly 2curry and 3curry. Here's your example { x } [ { y } [ x> y>
+ ] lambda ] lambda translated into that form: [ [ + ] curry ]. For an
example of use: 1 [ [ + ] curry ] call => [ 1 + ]; 1 2 [ [ + ] curry ]
call call => 3. It's
Hi,
Instead of redefining the 'listen' word, you can store a quotation in
the listener-hook variable.
Also defining a word : foo-on foo on ; is totally redundant. It is
not more readable and does not save keystrokes either.
Slava
On 13-Feb-07, at 7:32 PM, Eduardo Cavazos wrote:
> Hello,
>
On Wednesday 14 February 2007 11:47, Slava Pestov wrote:
> Also defining a word : foo-on foo on ; is totally redundant. It is
> not more readable and does not save keystrokes either.
Yeah, I prefer the just the variable and on/off. I have removed the redundant
words. The reason they were there i
On Wednesday 14 February 2007 11:47, Slava Pestov wrote:
> Instead of redefining the 'listen' word, you can store a quotation in
> the listener-hook variable.
Yeah, I noticed the listener-hook variable and I'd prefer to add things to a
hook. However...
: listener ( -- )
quit-flag get [ quit-fl
Slava,
The help for rethrow has an example but it seems to demonstrate catch instead
of rethrow. Did you mean for that example to go in the help for catch?
Ed
-
Take Surveys. Earn Cash. Influence the Future of IT
Join Sourc