[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: in defense of types

Matthias Felleisen <matthias@ccs.neu.edu> writes:


> > let z f = 
> >   let g = function (I x) -> f (fun z -> x (I x) z) in
> >   g (I g)
> > 
> Hey, function also lets you define recursive functions. 
> I said don't use a recursion construct. 

nope, "function" doesn't let you do so, "let rec" is mandatory.

the only free variable in "g" is "f" => "g" is a closure

> > > For people who need to see a typed version in ML that works
> > > for ALL types, see the last page of "The Little MLer". 
> > > 
> > > For those who need to see this in Java, take a look at the 
> > > last page of "A Little Java, A Few Patterns."
> > 
> > alas, i don't wanna order those books to read the last page :-(
> When I was young, there were libraries where one could 
> borrow books for free. I was too poor to own books, so 
> that came in handy :)

Alas, I'm far away from university. Libraries I can go too have things
like "Java for dummies" (in french of course), but not much more.

that's why internet is nice... when things are online of course ;p

> P.S. If you're curious, you may also look at the home pages 
> for these books at my Web page. I tend to have sample pages 
> and even chapters on-line :)

that i've done (hoping for an online version) and found "A Companion
to Chapter 10" but didn't find word "combinator"