ocaml 2.02 bug: curried printf

From: William Chesters (williamc@dai.ed.ac.uk)
Date: Sat Mar 06 1999 - 02:38:18 MET


Date: Sat, 6 Mar 1999 01:38:18 GMT
Message-Id: <199903060138.BAA13133@toy.william.bogus>
From: William Chesters <williamc@dai.ed.ac.uk>
To: caml-list@inria.fr
Subject: ocaml 2.02 bug: curried printf

This used to work in 2.01, but 2.02 outputs the wrong thing:

Cette programme-ci a fonctionné correctement avec 2.01; avec 2.02 non=

plus:

=09open Printf
=09open List
=09open String

=09let udt = [1; 2; 3] ;;

=09print_endline (concat " " (map (sprintf "foo%d") udt)) ;;
=09print_endline (concat " " (map (fun s -> sprintf "foo%d" s) udt)) ;;=

=09iter (printf "foo%d") udt; print_newline () ;;
=09iter (fun s -> printf "foo%d" s) udt; print_newline ()



This archive was generated by hypermail 2b29 : Sun Jan 02 2000 - 11:58:20 MET