Re: Page 76 of OCaml by John Whitington ???

"'Mr. Herr' [email protected] [ocaml_beginners]" <[email protected]> Tue, 29 Mar 2016 10:18:13 +0200
Newsgroups gmane.comp.lang.ocaml.beginners
Message-ID <[email protected]>

On 29.03.2016 06:41, Douglas Lewit [email protected] [ocaml_beginners] wrote:
>  
> I also gave something like this a try, but I ended up with a couple of error messages:
>
> */let pack list = match list with/*
> */|[ ] -> [ ]/*
> */|head :: tail -> match tail with/*
> */|[ ] -> [ ]/*
> */headOfTail :: tailOfTail -> if head = headOfTail then..... ( more code )/*
> */
> /*
> I thought it was clever, but either I just ended up with an empty list, a
> one-element list, or the compiler just rejected it.  I'm starting to feel a little
> dumb!  But I'll keep at it.
>
tailOfTail is a list, not an element!

/Str.