|
List Info
Thread: "ocaml_beginners"::[] Re: Generate the combinations of K distinct objects chosen from an N-element l
|
|
| "ocaml_beginners"::[] Re:
Generate the combinations of K distinct
objects chosen from an N-element l |

|
2006-11-14 16:10:06 |
|
--- roparzhhemon < roparzhhemon%40yahoo.com.br">roparzhhemon yahoo.com.br> wrote:
> If I understood the original question correctly, the point was to
> create a "polymorphic"
> function that works as well, say, on ["a";"b";"c";"d"] as on
> [1;2;3;4]. This is why the
> *list* l (and not just its length n) is an argument in my function.
I did not understand the question that way, but it is a minor
difference.
In case it was not clear, my point was that 1 and l, as 0 and O look
very similar when rendered with certain fonts that are common for
source code editing. So it is a bad idea to use them as variable
names if you aim for readability.
PS:
let cons h t = h::t;;
let rec comb es k = match (es, k) with
| ([], 0) -> [[]]
| ([], _) -> []
| (h::t, _) ->
List.rev_append
(List.map (cons h) (comb t (k-1)))
(comb t k);;
__________________________________________________________
Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail beta.
http://new.mail.yahoo.com
__._,_.___
.
__,_._,___
|
| "ocaml_beginners"::[] Re:
Generate the combinations of K distinct
objects chosen from an N-element l |

|
2006-11-15 10:02:28 |
|
hi,
Plz i want a solution (quickly)...
first do you speak french??
if you does you will find the subject of the project in the files added
else do you have any idea about mini-interpreter of basic in ocaml ??
else
you can go in this url
http://f.loulergue.free.fr/teaching/2007/l2-ocaml/devoir_de_programmation_2006-2007.tar.gz and you will find the mini-interpreter of basic in ocaml with many function incomplet
if ou can help me and finish some or all this functions....
think you and by
Radu Grigore < radugrigore%40yahoo.com">radugrigore yahoo.com> a écrit :
--- roparzhhemon < roparzhhemon%40yahoo.com.br">roparzhhemon yahoo.com.br> wrote:
> If I understood the original question correctly, the point was to
> create a "polymorphic"
> function that works as well, say, on ["a";"b";"c";"d"] as on
> [1;2;3;4]. This is why the
> *list* l (and not just its length n) is an argument in my function.
I did not understand the question that way, but it is a minor
difference.
In case it was not clear, my point was that 1 and l, as 0 and O look
very similar when rendered with certain fonts that are common for
source code editing. So it is a bad idea to use them as variable
names if you aim for readability.
PS:
let cons h t = h::t;;
let rec comb es k = match (es, k) with
| ([], 0) -> [[]]
| ([], _) -> []
| (h::t, _) ->
List.rev_append
(List.map (cons h) (comb t (k-1)))
(comb t k);;
__________________________________________________________
Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail beta.
http://new.mail.yahoo.com
---------------------------------
Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! Profitez des connaissances, des opinions et des expériences des internautes sur Yahoo! Questions/Réponses.
[Non-text portions of this message have been removed]
__._,_.___
.
__,_._,___
|
| "ocaml_beginners"::[] Re:
Generate the combinations of K distinct
objects chosen from an N-element l |

|
2006-11-15 10:56:03 |
|
I don't think it's appropriate you're requesting
others to complete an assignment for you in a public
forum.
I've cc'ed your your Professor
--- MOHAMED TEYEB < mohamed_teyeb1%40yahoo.fr">mohamed_teyeb1 yahoo.fr> wrote:
> hi,
> Plz i want a solution (quickly)...
> first do you speak french??
> if you does you will find the subject of the
> project in the files added
> else do you have any idea about mini-interpreter
> of basic in ocaml ??
> else
> you can go in this url
>
>
http://f.loulergue.free.fr/teaching/2007/l2-ocaml/devoir_de_programmation_2006-2007.tar.gz
> and you will find the mini-interpreter of basic in
> ocaml with many function incomplet
> if ou can help me and finish some or all this
> functions....
> think you and by
> Radu Grigore < radugrigore%40yahoo.com">radugrigore yahoo.com> a écrit :
> --- roparzhhemon
> < roparzhhemon%40yahoo.com.br">roparzhhemon yahoo.com.br> wrote:
>
> > If I understood the original question correctly,
> the point was to
> > create a "polymorphic"
> > function that works as well, say, on
> ["a";"b";"c";"d"] as on
> > [1;2;3;4]. This is why the
> > *list* l (and not just its length n) is an
> argument in my function.
>
> I did not understand the question that way, but it
> is a minor
> difference.
>
> In case it was not clear, my point was that 1 and l,
> as 0 and O look
> very similar when rendered with certain fonts that
> are common for
> source code editing. So it is a bad idea to use them
> as variable
> names if you aim for readability.
>
> PS:
> let cons h t = h::t;;
> let rec comb es k = match (es, k) with
> | ([], 0) -> [[]]
> | ([], _) -> []
> | (h::t, _) ->
> List.rev_append
> (List.map (cons h) (comb t (k-1)))
> (comb t k);;
>
>
__________________________________________________________
> Do you Yahoo!?
> Everyone is raving about the all-new Yahoo! Mail
> beta.
> http://new.mail.yahoo.com
>
>
>
>
>
> ---------------------------------
> Découvrez une nouvelle façon d'obtenir des réponses
> à toutes vos questions ! Profitez des connaissances,
> des opinions et des expériences des internautes sur
> Yahoo! Questions/Réponses.
>
> [Non-text portions of this message have been
> removed]
>
>
>
> Archives up to November 11, 2006 are also
> downloadable at
>
http://www.connettivo.net/cntprojects/ocaml_beginners/
> The archives of the very official ocaml list (the
> seniors' one) can be found at http://caml.inria.fr
> Attachments are banned and you're asked to be
> polite, avoid flames etc.
> Yahoo! Groups Links
>
> (Yahoo! ID required)
>
> mailto: ocaml_beginners-fullfeatured%40yahoogroups.com">ocaml_beginners-fullfeatured yahoogroups.com
>
>
>
>
"Work hard; increase production; prevent accidents, and be happy."
- thx1138
__________________________________________________________
Sponsored Link
$200,000 mortgage for $660/ mo -
30/15 yr fixed, reduce debt -
http://yahoo.ratemarketplace.com
__._,_.___
.
__,_._,___
|
| "ocaml_beginners"::[] Re:
Generate the combinations of K distinct
objects chosen from an N-element l |

|
2006-11-15 13:35:52 |
|
MOHAMED TEYEB wrote:
> hi,
> Plz i want a solution (quickly)...
> first do you speak french??
> if you does you will find the subject of the project in the files added
> else do you have any idea about mini-interpreter of basic in ocaml ??
I've not followed your URL, but yes, I have an "idea":
http://caml.inria.fr/pub/docs/oreilly-book/html/book-ora058.html
Or go for page 155 of the hardcopy in French.
Ernesto
__._,_.___
.
__,_._,___
|
| "ocaml_beginners"::[] Re:
Generate the combinations of K distinct
objects chosen from an N-element l |

|
2006-11-15 17:25:06 |
|
ok all right
i am sorry ...but i does't meany complete an assignment for me : i search any buddy can help me to finish my assignment...
Lee Render < id2359%40yahoo.com">id2359 yahoo.com> a écrit :
I don't think it's appropriate you're requesting
others to complete an assignment for you in a public
forum.
I've cc'ed your your Professor
--- MOHAMED TEYEB < mohamed_teyeb1%40yahoo.fr">mohamed_teyeb1 yahoo.fr> wrote:
> hi,
> Plz i want a solution (quickly)...
> first do you speak french??
> if you does you will find the subject of the
> project in the files added
> else do you have any idea about mini-interpreter
> of basic in ocaml ??
> else
> you can go in this url
>
>
http://f.loulergue.free.fr/teaching/2007/l2-ocaml/devoir_de_programmation_2006-2007.tar.gz
> and you will find the mini-interpreter of basic in
> ocaml with many function incomplet
> if ou can help me and finish some or all this
> functions....
> think you and by
> Radu Grigore < radugrigore%40yahoo.com">radugrigore yahoo.com> a écrit :
> --- roparzhhemon
> < roparzhhemon%40yahoo.com.br">roparzhhemon yahoo.com.br> wrote:
>
> > If I understood the original question correctly,
> the point was to
> > create a "polymorphic"
> > function that works as well, say, on
> ["a";"b";"c";"d"] as on
> > [1;2;3;4]. This is why the
> > *list* l (and not just its length n) is an
> argument in my function.
>
> I did not understand the question that way, but it
> is a minor
> difference.
>
> In case it was not clear, my point was that 1 and l,
> as 0 and O look
> very similar when rendered with certain fonts that
> are common for
> source code editing. So it is a bad idea to use them
> as variable
> names if you aim for readability.
>
> PS:
> let cons h t = h::t;;
> let rec comb es k = match (es, k) with
> | ([], 0) -> [[]]
> | ([], _) -> []
> | (h::t, _) ->
> List.rev_append
> (List.map (cons h) (comb t (k-1)))
> (comb t k);;
>
>
__________________________________________________________
> Do you Yahoo!?
> Everyone is raving about the all-new Yahoo! Mail
> beta.
> http://new.mail.yahoo.com
>
>
>
>
>
> ---------------------------------
> Découvrez une nouvelle façon d'obtenir des réponses
> à toutes vos questions ! Profitez des connaissances,
> des opinions et des expériences des internautes sur
> Yahoo! Questions/Réponses.
>
> [Non-text portions of this message have been
> removed]
>
>
>
> Archives up to November 11, 2006 are also
> downloadable at
>
http://www.connettivo.net/cntprojects/ocaml_beginners/
> The archives of the very official ocaml list (the
> seniors' one) can be found at http://caml.inria.fr
> Attachments are banned and you're asked to be
> polite, avoid flames etc.
> Yahoo! Groups Links
>
> (Yahoo! ID required)
>
> mailto: ocaml_beginners-fullfeatured%40yahoogroups.com">ocaml_beginners-fullfeatured yahoogroups.com
>
>
>
>
"Work hard; increase production; prevent accidents, and be happy."
- thx1138
__________________________________________________________
Sponsored Link
$200,000 mortgage for $660/ mo -
30/15 yr fixed, reduce debt -
http://yahoo.ratemarketplace.com
---------------------------------
Yahoo! Mail réinvente le mail ! Découvrez le nouveau Yahoo! Mail et son interface révolutionnaire.
[Non-text portions of this message have been removed]
__._,_.___
.
__,_._,___
|
| "ocaml_beginners"::[] Re:
Generate the combinations of K distinct
objects chosen from an N-element l |

|
2006-11-15 16:02:58 |
|
--- Lee Render < id2359%40yahoo.com">id2359 yahoo.com> wrote:
> I don't think it's appropriate you're requesting
> others to complete an assignment for you in a public
> forum.
I believe it's inappropriate to ask a question that shows no effort
to solve it yourself even in a private forum.
__________________________________________________________
Sponsored Link
Mortgage rates near 39yr lows.
$510k for $1,698/mo. Calculate new payment!
www.LowerMyBills.com/lre
__._,_.___
.
__,_._,___
|
| "ocaml_beginners"::[] Re:
Generate the combinations of K distinct
objects chosen from an N-element l |

|
2006-11-15 22:36:10 |
|
On Wednesday 15 November 2006 16:02, Radu Grigore wrote:
> --- Lee Render < id2359%40yahoo.com">id2359 yahoo.com> wrote:
> > I don't think it's appropriate you're requesting
> > others to complete an assignment for you in a public
> > forum.
>
> I believe it's inappropriate to ask a question that shows no effort
> to solve it yourself even in a private forum.
If you guys could go ahead and make some kickass products for me (quickly),
that'd be great.
--
Dr Jon D Harrop, Flying Frog Consultancy Ltd.
Objective CAML for Scientists
http://www.ffconsultancy.com/products/ocaml_for_scientists
__._,_.___
.
__,_._,___
|
[1-7]
|
|