caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] List.find_pos in revised syntax
@ 2002-10-18 16:09 Kontra, Gergely
  2002-10-18 16:21 ` Daniel de Rauglaudre
  0 siblings, 1 reply; 2+ messages in thread
From: Kontra, Gergely @ 2002-10-18 16:09 UTC (permalink / raw)
  To: caml-list

Hi!

I began to learn with the revised syntax, because I made some annoying
mistake due to the ambigousness of the syntax.

My very first problem in this road is how to write a simple find_pos
function, which returns the first position, which equals to the given
element.

I can write it in the normal syntax, and of course I can translate it
into the revised syntax (BTW: can I convert to lisp or sml syntax?), but
the result I get wasn't so nice.

So I want to implement in the revised syntax find_pos e l (type 'a -> 'a
list -> 'a option),
which returns the position of the first element in l, which equals to e.
thx
Gergo
+-[Kontra, Gergely @ Budapest University of Technology and Economics]-+
|         Email: kgergely@mcl.hu,  kgergely@turul.eet.bme.hu          |
|  URL:   turul.eet.bme.hu/~kgergely    Mobile: (+36 20) 356 9656     |
+-------"Olyan langesz vagyok, hogy poroltoval kellene jarnom!"-------+
.
Magyar php mirror es magyar php dokumentacio: http://hu.php.net


-------------------
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] 2+ messages in thread

* Re: [Caml-list] List.find_pos in revised syntax
  2002-10-18 16:09 [Caml-list] List.find_pos in revised syntax Kontra, Gergely
@ 2002-10-18 16:21 ` Daniel de Rauglaudre
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel de Rauglaudre @ 2002-10-18 16:21 UTC (permalink / raw)
  To: caml-list

Hi,

On Fri, Oct 18, 2002 at 06:09:51PM +0200, Kontra, Gergely wrote:

> I can write it in the normal syntax, and of course I can translate it
> into the revised syntax (BTW: can I convert to lisp or sml syntax?), but
> the result I get wasn't so nice.

Is it possible to see your code?

-- 
Daniel de RAUGLAUDRE
daniel.de_rauglaudre@inria.fr
http://cristal.inria.fr/~ddr/
-------------------
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] 2+ messages in thread

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

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-18 16:09 [Caml-list] List.find_pos in revised syntax Kontra, Gergely
2002-10-18 16:21 ` Daniel de Rauglaudre

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).