caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Applications written in O'Caml
@ 2002-04-12 15:51 Vincent Foley
  2002-04-12 16:15 ` Benjamin C. Pierce
                   ` (5 more replies)
  0 siblings, 6 replies; 19+ messages in thread
From: Vincent Foley @ 2002-04-12 15:51 UTC (permalink / raw)
  To: caml-list

On http://caml.inria.fr, there's a section mentionning some applications
written in O'Caml.  I'm pretty sure this list is not quite up to date
(considering that a very nice application, Active DVI, is not included
there.)  I'd like to know, besides the application mentionned there and
Active DVI, are there other significant applications written in O'Caml?

Regards,
  Vincent

P.S.: I also meant to ask: does anyone know schools where students are
given programming classes with O'Caml?

-- 

Vincent Foley-Bourgon
Email: vinfoley@iquebec.com
Homepage: http://darkhost.mine.nu:81
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Caml-list] Applications written in O'Caml
  2002-04-12 15:51 [Caml-list] Applications written in O'Caml Vincent Foley
@ 2002-04-12 16:15 ` Benjamin C. Pierce
  2002-04-12 16:44   ` [Caml-list] Simple question Eric Merritt
  2002-04-13 12:45   ` [Caml-list] Applications written in O'Caml Oliver Bandel
  2002-04-12 16:40 ` Maxence Guesdon
                   ` (4 subsequent siblings)
  5 siblings, 2 replies; 19+ messages in thread
From: Benjamin C. Pierce @ 2002-04-12 16:15 UTC (permalink / raw)
  To: Vincent Foley; +Cc: caml-list

> P.S.: I also meant to ask: does anyone know schools where students are
> given programming classes with O'Caml?

The intro computer science sequence at the University of Pennsylvania
uses OCaml for the first two months (then switches to Java).

         http://www.seas.upenn.edu/~cse120/home.html

   -- Benjamin
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Caml-list] Applications written in O'Caml
  2002-04-12 15:51 [Caml-list] Applications written in O'Caml Vincent Foley
  2002-04-12 16:15 ` Benjamin C. Pierce
@ 2002-04-12 16:40 ` Maxence Guesdon
  2002-04-12 17:04 ` Warp
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 19+ messages in thread
From: Maxence Guesdon @ 2002-04-12 16:40 UTC (permalink / raw)
  To: Vincent Foley; +Cc: caml-list


> On http://caml.inria.fr, there's a section mentionning some applications
> written in O'Caml.  I'm pretty sure this list is not quite up to date
> (considering that a very nice application, Active DVI, is not included
> there.)  I'd like to know, besides the application mentionned there and
> Active DVI, are there other significant applications written in O'Caml?

You can see applications written in ocaml here :
http://caml.inria.fr/humps/caml.html#Applications

If someone knows about other applications, just let me know :

hump@pauillac.inria.fr

--
Maxence Guesdon
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Caml-list] Simple question
  2002-04-12 16:15 ` Benjamin C. Pierce
@ 2002-04-12 16:44   ` Eric Merritt
  2002-04-12 16:59     ` Remi VANICAT
  2002-04-12 17:04     ` Maxence Guesdon
  2002-04-13 12:45   ` [Caml-list] Applications written in O'Caml Oliver Bandel
  1 sibling, 2 replies; 19+ messages in thread
From: Eric Merritt @ 2002-04-12 16:44 UTC (permalink / raw)
  To: caml-list

let me start off by saying that if this is not the
place to post this type of question please direct me
to the correct list/group. I am picking up ocaml,
starting off by doing a few simple things. I am at
somewhat of an impass here in that I cannot figure out
why the function below gives me type errors. It works
fine if I leave it non-tail recursive, but as soon as
I put in an accumulator and make it tail-recursive it
fails to compile. If one of you could please point me
in the right direction for solving this problem that
would be great. btw this is only for my own
edification. 

let rec apply_fun_list x f_list accm =
  match f_list with
     h::t ->
           apply_fun_list x t accum::(h x)
   | [] ->
        accum::[];;

Error is 

The expression has type 'a list but is here used with
type 'a

Thank you for your attention.
Eric

__________________________________________________
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Caml-list] Simple question
  2002-04-12 16:44   ` [Caml-list] Simple question Eric Merritt
@ 2002-04-12 16:59     ` Remi VANICAT
  2002-04-12 17:04     ` Maxence Guesdon
  1 sibling, 0 replies; 19+ messages in thread
From: Remi VANICAT @ 2002-04-12 16:59 UTC (permalink / raw)
  To: caml-list

Eric Merritt <cyberlync@yahoo.com> writes:

> let me start off by saying that if this is not the
> place to post this type of question please direct me
> to the correct list/group. I am picking up ocaml,
> starting off by doing a few simple things. I am at
> somewhat of an impass here in that I cannot figure out
> why the function below gives me type errors. It works
> fine if I leave it non-tail recursive, but as soon as
> I put in an accumulator and make it tail-recursive it
> fails to compile. If one of you could please point me
> in the right direction for solving this problem that
> would be great. btw this is only for my own
> edification. 
> 
> let rec apply_fun_list x f_list accm =
>   match f_list with
>      h::t ->
>            apply_fun_list x t accum::(h x)
>    | [] ->
>         accum::[];;

 :: is the constructor that add something at the beginning of the
list.

so you may want to say :

let rec apply_rev_fun_list x f_list accum =
  match f_list with
  | h::t ->
        apply_fun_list x t (h t)::accum
  | [] -> accum


but there, the function will reverse the list. It might not be what
you want (but List.rev is tail recursive)

by the way, I would have wrote it like :

let rec apply_fun_list x f_list =
  List.map (fun h -> h x) f_list

but List.map is not tail recursive....

-- 
Rémi Vanicat
vanicat@labri.u-bordeaux.fr
http://dept-info.labri.u-bordeaux.fr/~vanicat
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Caml-list] Simple question
  2002-04-12 16:44   ` [Caml-list] Simple question Eric Merritt
  2002-04-12 16:59     ` Remi VANICAT
@ 2002-04-12 17:04     ` Maxence Guesdon
  2002-04-12 17:57       ` Remi VANICAT
  1 sibling, 1 reply; 19+ messages in thread
From: Maxence Guesdon @ 2002-04-12 17:04 UTC (permalink / raw)
  To: Eric Merritt; +Cc: caml-list


You want your accum to be a 'a list, not 'a, so use it as a list :

let rec apply_fun_list x f_list accum =
  match f_list with
     h::t ->
           apply_fun_list x t (accum@(h x))
   | [] ->
        accum;;

--
Maxence Guesdon
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Caml-list] Applications written in O'Caml
  2002-04-12 15:51 [Caml-list] Applications written in O'Caml Vincent Foley
  2002-04-12 16:15 ` Benjamin C. Pierce
  2002-04-12 16:40 ` Maxence Guesdon
@ 2002-04-12 17:04 ` Warp
  2002-04-13  2:27 ` eijiro_sumii
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 19+ messages in thread
From: Warp @ 2002-04-12 17:04 UTC (permalink / raw)
  To: OCaml

> P.S.: I also meant to ask: does anyone know schools where students are
> given programming classes with O'Caml?

The 4th year Univerty (maitrise) in Computer Sciences at Bordeaux got a
module called "Advanced Programming" where you can get a little taste of
OCaml.

Nicolas Cannasse

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Caml-list] Simple question
  2002-04-12 17:04     ` Maxence Guesdon
@ 2002-04-12 17:57       ` Remi VANICAT
  2002-04-12 19:15         ` Eric Merritt
  0 siblings, 1 reply; 19+ messages in thread
From: Remi VANICAT @ 2002-04-12 17:57 UTC (permalink / raw)
  To: caml-list

Maxence Guesdon <maxence.guesdon@inria.fr> writes:

> You want your accum to be a 'a list, not 'a, so use it as a list :
> 
> let rec apply_fun_list x f_list accum =
>   match f_list with
>      h::t ->
>            apply_fun_list x t (accum@(h x))
>    | [] ->
>         accum;;

erg, apply_fun_list become tail recursive, but it's in O(n^2) (when
the first version is in O(n)), and as @ is not tail recursive, this
doesn't resolve the problem of Usage of the stack....

better stick to the non tail recursive version that to do this.

-- 
Rémi Vanicat
vanicat@labri.u-bordeaux.fr
http://dept-info.labri.u-bordeaux.fr/~vanicat
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Caml-list] Simple question
  2002-04-12 17:57       ` Remi VANICAT
@ 2002-04-12 19:15         ` Eric Merritt
  2002-04-12 19:55           ` John Prevost
                             ` (2 more replies)
  0 siblings, 3 replies; 19+ messages in thread
From: Eric Merritt @ 2002-04-12 19:15 UTC (permalink / raw)
  To: caml-list


> erg, apply_fun_list become tail recursive, but it's
> in O(n^2) (when
> the first version is in O(n)), and as @ is not tail
> recursive, this
> doesn't resolve the problem of Usage of the
> stack....
> 
> better stick to the non tail recursive version that
> to do this.

by this I assume that the '@' function is not as
strait forward as I thought it would be? In what
manner does it append to the list to make the time
0(n^2)? -just curious.

Thanks 
Eric

__________________________________________________
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Caml-list] Simple question
  2002-04-12 19:15         ` Eric Merritt
@ 2002-04-12 19:55           ` John Prevost
  2002-04-15 20:08             ` Eric Merritt
  2002-04-12 20:20           ` james woodyatt
  2002-04-13 11:10           ` Remi VANICAT
  2 siblings, 1 reply; 19+ messages in thread
From: John Prevost @ 2002-04-12 19:55 UTC (permalink / raw)
  To: Eric Merritt; +Cc: caml-list

>>>>> "em" == Eric Merritt <cyberlync@yahoo.com> writes:

    em> by this I assume that the '@' function is not as strait
    em> forward as I thought it would be? In what manner does it
    em> append to the list to make the time 0(n^2)? -just curious.

Actually, it's O(n) because it's straightforward and doesn't cause
side-effects.  The O(n^2) is when it is used n times.  Here's an
implementation that works similarly:

let rec append a b = match (a,b) with
  | [], _ -> b
  | h::t, _ -> h :: append t b

If you keep appending one element onto the end of a list, you can see
that append has to run down the entire first list each time to build a
new list with your new value at the end.  If you append one item at
the beginning each time, it behaves substatntially like :: does.

So (@) is O(n) with n being the size of the first argument.

John.
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Caml-list] Simple question
  2002-04-12 19:15         ` Eric Merritt
  2002-04-12 19:55           ` John Prevost
@ 2002-04-12 20:20           ` james woodyatt
  2002-04-13 11:10           ` Remi VANICAT
  2 siblings, 0 replies; 19+ messages in thread
From: james woodyatt @ 2002-04-12 20:20 UTC (permalink / raw)
  To: Eric Merritt; +Cc: caml-list

On Friday, April 12, 2002, at 12:15 PM, Eric Merritt wrote:
>
> by this I assume that the '@' function is not as
> strait forward as I thought it would be? In what
> manner does it append to the list to make the time
> 0(n^2)? -just curious.

Here's the definition of the '@' operator from $OCAMLLIB/pervasives.ml:
> let rec (@) l1 l2 =
>   match l1 with
>     [] -> l2
>   | hd :: tl -> hd :: (tl @ l2)


--
j h woodyatt <jhw@wetware.com>

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Caml-list] Applications written in O'Caml
  2002-04-12 15:51 [Caml-list] Applications written in O'Caml Vincent Foley
                   ` (2 preceding siblings ...)
  2002-04-12 17:04 ` Warp
@ 2002-04-13  2:27 ` eijiro_sumii
  2002-04-13  3:28   ` Michael Vanier
  2002-04-15  8:16 ` Nicolas barnier
  2002-04-16 10:12 ` Jacek Chrzaszcz
  5 siblings, 1 reply; 19+ messages in thread
From: eijiro_sumii @ 2002-04-13  2:27 UTC (permalink / raw)
  To: caml-list; +Cc: sumii

From: Vincent Foley <vinfoley@iquebec.com>
> P.S.: I also meant to ask: does anyone know schools where students are
> given programming classes with O'Caml?

The department of information science in u-tokyo has been practicing a
rather ambitious curriculum involving functional languages, including
OCaml, for undergraduate students.

 - In the winter semester of the 2nd year, Scheme is taught, where the
   last assignment is implementing a meta-circular Scheme interpreter.

 - In the summer semester of the 3rd year, OCaml (and also Prolog) is
   taught, where the assignments include implementing a mini-ML
   interpreter with ML-polymorphic type inference (and also a
   mini-Prolog interpreter in ML).

 - In the winter semester of the 3rd year, students implement a
   compiler of a simply typed higher-order functional language.  This
   is linked with another class where students design and implement
   their own original CPUs, onto which a ray tracer written in mini-ML
   is compiled and its speed is competed.

These may sound like crash courses, but given enough help, most
students just do fine, maybe because our department is rather small
(there are only 30-40 students per year).

--
Eijiro Sumii (http://www.yl.is.s.u-tokyo.ac.jp/~sumii/)
Research Associate of Yonezawa Group, University of Tokyo
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Caml-list] Applications written in O'Caml
  2002-04-13  2:27 ` eijiro_sumii
@ 2002-04-13  3:28   ` Michael Vanier
  0 siblings, 0 replies; 19+ messages in thread
From: Michael Vanier @ 2002-04-13  3:28 UTC (permalink / raw)
  To: caml-list


From: Vincent Foley <vinfoley@iquebec.com>
> P.S.: I also meant to ask: does anyone know schools where students are
> given programming classes with O'Caml?

Here at Caltech, the compiler design class is taught using ocaml as the
implementation language.  Also, a new course on type theory is being taught
this term, using the book "Types in Programming Languages" by Benjamin
Pierce, which uses ocaml for all its examples.  I teach a programming
languages/projects course, and two of my students are doing their project
with ocaml.  As one of them said "I have yet to meet a serious hacker who
learned ocaml and didn't like it."  I feel the same way.

Mike
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Caml-list] Simple question
  2002-04-12 19:15         ` Eric Merritt
  2002-04-12 19:55           ` John Prevost
  2002-04-12 20:20           ` james woodyatt
@ 2002-04-13 11:10           ` Remi VANICAT
  2 siblings, 0 replies; 19+ messages in thread
From: Remi VANICAT @ 2002-04-13 11:10 UTC (permalink / raw)
  To: caml-list

Eric Merritt <cyberlync@yahoo.com> writes:

> > erg, apply_fun_list become tail recursive, but it's
> > in O(n^2) (when
> > the first version is in O(n)), and as @ is not tail
> > recursive, this
> > doesn't resolve the problem of Usage of the
> > stack....
> > 
> > better stick to the non tail recursive version that
> > to do this.
> 
> by this I assume that the '@' function is not as
> strait forward as I thought it would be? In what
> manner does it append to the list to make the time
> 0(n^2)? -just curious.

so let's look at :

let rec apply_fun_list x f_list accum =
  match f_list with
     h::t ->
           apply_fun_list x t (accum@(h x))
   | [] ->
        accum;;


so the line "apply_fun_list x t (accum@(h x))" is done O(n) time (one
time for each element in f_list), and "(accum@(h x))" take time O(n),
so the time taken by this algorithm is O(n)*O(n)=O(n^2).


-- 
Rémi Vanicat
vanicat@labri.u-bordeaux.fr
http://dept-info.labri.u-bordeaux.fr/~vanicat
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Caml-list] Applications written in O'Caml
  2002-04-12 16:15 ` Benjamin C. Pierce
  2002-04-12 16:44   ` [Caml-list] Simple question Eric Merritt
@ 2002-04-13 12:45   ` Oliver Bandel
  2002-04-13 19:07     ` Benjamin C. Pierce
  1 sibling, 1 reply; 19+ messages in thread
From: Oliver Bandel @ 2002-04-13 12:45 UTC (permalink / raw)
  To: bcpierce; +Cc: Vincent Foley, caml-list



On Fri, 12 Apr 2002, Benjamin C. Pierce wrote:

> > P.S.: I also meant to ask: does anyone know schools where students are
> > given programming classes with O'Caml?
> 
> The intro computer science sequence at the University of Pennsylvania
> uses OCaml for the first two months (then switches to Java).

Why do they use Ocaml?
Why do they swithc to Java?

Ciao,
   Oliver

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Caml-list] Applications written in O'Caml
  2002-04-13 12:45   ` [Caml-list] Applications written in O'Caml Oliver Bandel
@ 2002-04-13 19:07     ` Benjamin C. Pierce
  0 siblings, 0 replies; 19+ messages in thread
From: Benjamin C. Pierce @ 2002-04-13 19:07 UTC (permalink / raw)
  To: Oliver Bandel; +Cc: Vincent Foley, caml-list

> Why do they use Ocaml?

Basically the obvious reasons: using a functional language with a nice
small core means that you can go directly into *programming* right at the
beginning of the semester.  We start with simple recursive numerical
algorithms, then move quickly into manipulating lists, trees, sorting,
searching, etc.  The final assignment in OCaml involves modifying an
evaluator for a tiny OCaml-core-like language.

> Why do they swithc to Java?

Basically the obvious reasons: to introduce objects (in a "conventional"
style), and so that students can get summer jobs.

     Benjamin

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Caml-list] Applications written in O'Caml
  2002-04-12 15:51 [Caml-list] Applications written in O'Caml Vincent Foley
                   ` (3 preceding siblings ...)
  2002-04-13  2:27 ` eijiro_sumii
@ 2002-04-15  8:16 ` Nicolas barnier
  2002-04-16 10:12 ` Jacek Chrzaszcz
  5 siblings, 0 replies; 19+ messages in thread
From: Nicolas barnier @ 2002-04-15  8:16 UTC (permalink / raw)
  To: Vincent Foley; +Cc: caml-list

Vincent Foley wrote:
> 
> P.S.: I also meant to ask: does anyone know schools where students are
> given programming classes with O'Caml?

The engineer students with a major in IT at the French University of Civil
Aviation (ENAC, Toulouse - www.enac.fr) are given OCaml courses during the
first year (it is the first programming language taught here), followed by
an algorithmic course with implementation in OCaml. They can use the
language in their final project (3rd year) as well.

Some first year students arrives here with a little practice learned during
the " classes préparatoires aux grandes écoles " (two or three years of
intense preparatory courses before entering an engineering school) if they
have chosen optional IT classes (or something like that, I'm not to sure).

BTW, our students often are eager to work abroad for their final training
period, if it's what you meant... (and those willing to developp with OCaml
are often the best ones :-)

Regards

-- Nicolas Barnier
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Caml-list] Simple question
  2002-04-12 19:55           ` John Prevost
@ 2002-04-15 20:08             ` Eric Merritt
  0 siblings, 0 replies; 19+ messages in thread
From: Eric Merritt @ 2002-04-15 20:08 UTC (permalink / raw)
  To: caml-list


> Actually, it's O(n) because it's straightforward and
> doesn't cause
> side-effects.  The O(n^2) is when it is used n
> times.  Here's an
> implementation that works similarly:
> 
> let rec append a b = match (a,b) with
>   | [], _ -> b
>   | h::t, _ -> h :: append t b
> 
> If you keep appending one element onto the end of a
> list, you can see
> that append has to run down the entire first list
> each time to build a
> new list with your new value at the end.  If you
> append one item at
> the beginning each time, it behaves substatntially
> like :: does.
> 
> So (@) is O(n) with n being the size of the first
> argument.

This actually makes allot of sense. I am very new to
the functional world (basically Ocaml and Erlang are
my current learning projects) so many of things that
might be obvious to a more experienced functional
programmer I do not see. This is slowly changing as I
write more code, of course ;). 

In allot of ways this strugle reminds me of my initial
attempts to learn the Object Oriented Paradigm, only
this is a little more foriegn. In any case, I thank
you all for your help and I hope to be joining your
ranks as a decent functional programmer one day.


__________________________________________________
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Caml-list] Applications written in O'Caml
  2002-04-12 15:51 [Caml-list] Applications written in O'Caml Vincent Foley
                   ` (4 preceding siblings ...)
  2002-04-15  8:16 ` Nicolas barnier
@ 2002-04-16 10:12 ` Jacek Chrzaszcz
  5 siblings, 0 replies; 19+ messages in thread
From: Jacek Chrzaszcz @ 2002-04-16 10:12 UTC (permalink / raw)
  To: Vincent Foley; +Cc: caml-list

Vincent Foley writes:
 > P.S.: I also meant to ask: does anyone know schools where students are
 > given programming classes with O'Caml?
 > 

Hello list,

At Warsaw University, first-year students have the "Introduction to
programming" course. Since last year a part of them (about one third)
- the volunteers - are taught the functionnal approach, using
Ocaml. They are doing fine, but one can see that most of them already
know C or Pascal.

By the way, it is a great pleasure to see how the understanding of
such functions like fold is slowly coming to them :-)

Later in the cursus (about the third-fourth year), there is a more
"serious" functionnal programming course. The practical things are
taught using Ocaml, SML or sometimes Haskel (with some deeper insight
on the laziness), depending on the person who does the course.

Cheers

Jacek
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2002-04-16 10:13 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-12 15:51 [Caml-list] Applications written in O'Caml Vincent Foley
2002-04-12 16:15 ` Benjamin C. Pierce
2002-04-12 16:44   ` [Caml-list] Simple question Eric Merritt
2002-04-12 16:59     ` Remi VANICAT
2002-04-12 17:04     ` Maxence Guesdon
2002-04-12 17:57       ` Remi VANICAT
2002-04-12 19:15         ` Eric Merritt
2002-04-12 19:55           ` John Prevost
2002-04-15 20:08             ` Eric Merritt
2002-04-12 20:20           ` james woodyatt
2002-04-13 11:10           ` Remi VANICAT
2002-04-13 12:45   ` [Caml-list] Applications written in O'Caml Oliver Bandel
2002-04-13 19:07     ` Benjamin C. Pierce
2002-04-12 16:40 ` Maxence Guesdon
2002-04-12 17:04 ` Warp
2002-04-13  2:27 ` eijiro_sumii
2002-04-13  3:28   ` Michael Vanier
2002-04-15  8:16 ` Nicolas barnier
2002-04-16 10:12 ` Jacek Chrzaszcz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).