Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: David Teller <David.Teller@ens-lyon.org>
To: Hendrik Tews <H.Tews@cs.ru.nl>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Teaching bottomline, part 2: what went right.
Date: Wed, 23 May 2007 08:54:17 -0400	[thread overview]
Message-ID: <1179924858.6966.95.camel@Blefuscu> (raw)
In-Reply-To: <wwu3b1ox9tz.fsf@tandem.cs.ru.nl>

No, it fails at runtime, of course:
let f _ = List.hd []

I'm just happy that that student managed to produce such a function.
Remember that they've had only one term of OCaml/functional programming,
no type theory, no lambda-calculus, no semantics of programming
languages, etc.

Cheers,
 David


On Wed, 2007-05-23 at 09:44 +0200, Hendrik Tews wrote:
> David Teller <David.Teller@univ-orleans.fr> writes:
> 
>    * One of my students did manage to write a function with type 'a -> 'b
>    without using Obj or Marshal. 
> 
> It's easy if the function doesn't have to terminate:
> 
>    let f x = raise Not_found;;
> 
> Does the students function terminate without exception or other
> kinds of runtime errors?
> 
> Bye,
> 
> Hendrik
> 
> _______________________________________________
> Caml-list mailing list. Subscription management:
> http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
> Archives: http://caml.inria.fr
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs


      reply	other threads:[~2007-05-24 13:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-22 22:10 David Teller
2007-05-23  7:44 ` [Caml-list] " Hendrik Tews
2007-05-23 12:54   ` David Teller [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1179924858.6966.95.camel@Blefuscu \
    --to=david.teller@ens-lyon.org \
    --cc=H.Tews@cs.ru.nl \
    --cc=caml-list@yquem.inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox