[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | David Teller <David.Teller@e...> |
| Subject: | Re: [Caml-list] Teaching bottomline, part 2: what went right. |
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