Thanks all!

I will take a look at http://tortoisesvn.tigris.org/

At the moment I'm using the tarball "5 Aug 2006 Felix1.1.2 (new)".
Maybe some changes has been made since then, because I can't get parameters 
with the fun keyword to compile.

The thing I wanted to investigate was if (fun x:int) equals (x:unit->int) or 
(var x:unit->void)?

If the latter is right, why the type int? Seems like Erick and John gave 
slightly different answers to Jonathan (see below).

Oh, and a last question.
In the case of eager evaluation, are parameters evaluated from left to right or 
is the order irrelevant in Felix?

\Klas

Erick wrote:
> Finally, the fun argument is just sugar for a function call. So this:
> 
> proc foo (fun x:int) {
>   print x; endl;
>   print x; endl;
> }
> 
> is sugar for this:
> 
> proc foo (x:unit->int) {
>   print (x ()); endl;
>   print (x ()); endl;
> }
> 
> Then it can be used like this:
> 
> x := 1;
> foo { x++; return x; };
> print x; endl;
> 
> should print out:
> 
> 2
> 3
< 3


John wrote:
>if you want to force lazy evaluation you write:
> 
>       fun cond(c:bool, var thn:unit->void, var els:unit->void) =>
>               if c then thn() else els() endif
>       }
> 
> and call it like:
> 
>       cond (true, {x/y}, {x/0} )
> 
> That divide by zero won't happen, because you're passing 
> a closure which is not executed: lazy evaluation.
> 
> There is a shorthand for lazy evaluation:
> 
>       fun cond(c:bool, fun thn:int, fun els:int):int =>
>               if c then thn else els endif
>       ;
> 
> it means precisely the same as the previously given
> long version.


> 
> From: Erick Tryzelaar <[EMAIL PROTECTED]>
> Date: 2006/09/29 fr PM 06:45:02 CEST
> To: Klas I <[EMAIL PROTECTED]>
> CC: [EMAIL PROTECTED], 
>       [email protected]
> Ämne: Re: [Felix-language] (no subject)
> 
> Klas I wrote:
> > Hi!
> >
> > Is there a tarball of the latest version?
> > I just found  http://www.wincvs.org/  ,but I haven't figured it out yet.
> >
> > Cheers
> > Klas
> 
> Good Morning,
> 
> We haven't released the latest version yet, but if you're interested in 
> tracking our most recent developments, you'll have to use subversion. If 
> you get a command line felix, this should work:
> 
> svn co http://svn.sourceforge.net:/svnroot/felix/felix/trunk felix
> 
> It seems you're on windows. If so, I'd recommend using tortoisesvn:
> 
> http://tortoisesvn.tigris.org/
> 
> I haven't used it for a couple years though, so I don't remember exactly how 
> to do it. The documentation should point you to how to grab data from that 
> http link from above.
> 
> Other options are listed here:
> 
> http://subversion.tigris.org/links.html
> 
> Mind you that the latest version does tend to change often, and break as well 
> :) If you have any problems, just send another mail to felix-language and 
> we'll help you out.
> 
> -e
> 
> -------------------------------------------------------------------------
> 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
> _______________________________________________
> Felix-language mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/felix-language
> 


-------------------------------------------------------------------------
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
_______________________________________________
Felix-language mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/felix-language

Reply via email to