On Wed, Apr 15, 2009 at 4:41 PM, Andrey Riabushenko <cd...@bk.ru> wrote:
> Something like that:
>
> Stats.linear_regression "y ~ x1 exp(x2) log(x3) x3^2"
> Returns float -> float -> float -> float -> regression_result = <fun>
...
> 2. The second question regarding function unparsing. I haven't used this
> technique before. Are there some docs, blog articles, descriptions and etc?
> The only relevant documentation I have found is printf.ml :). Might someone
> have a minimal working example to demonstrate?

The Batteries Print module and associated syntax extension may be a
useful base for implementing something similar to what you are
proposing:

http://git.ocamlcore.org/cgi-bin/gitweb.cgi?p=batteries/batteries.git;a=blob_plain;f=src/core/extlib/print.ml;hb=HEAD
and
http://git.ocamlcore.org/cgi-bin/gitweb.cgi?p=batteries/batteries.git;a=tree;f=src/syntax/pa_strings;hb=HEAD

This allows for syntax like:
Print.printf p"This is a list of integers: %{int list}"
to return:
int list -> unit = <fun>

Hez

-- 
Hezekiah M. Carty
Graduate Research Assistant
University of Maryland
Department of Atmospheric and Oceanic Science

_______________________________________________
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 via email to