Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] List.find_pos in revised syntax
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-10-18 (16:09)
From: Kontra, Gergely <kgergely@m...>
Subject: [Caml-list] List.find_pos in revised syntax

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

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.
+-[Kontra, Gergely @ Budapest University of Technology and Economics]-+
|         Email:,          |
|  URL:    Mobile: (+36 20) 356 9656     |
+-------"Olyan langesz vagyok, hogy poroltoval kellene jarnom!"-------+
Magyar php mirror es magyar php dokumentacio:

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: