[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Kontra, Gergely <kgergely@m...> |
| Subject: | [Caml-list] List.find_pos in revised syntax |
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