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] newbie questions
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Basile STARYNKEVITCH <basile@s...>
Subject: [Caml-list] newbie questions
>>>>> "Ruediger" == Dr Ruediger M Flaig <> writes:

    Ruediger> Good morning to all you bedouins out there :-) , as I am
    Ruediger> a neophyte to CAML, forgive me if my questions have been
    Ruediger> asked (and answered) a hundred times before...

You might have checked in the mailing list archive before asking...

    Ruediger> 1.: Is there any means of doing list-type pattern
    Ruediger> matching (style "| h::t -> ...") for recursion on
    Ruediger> strings? [...]

unfortunately no. You cannot have pattern matching on strings.
But the Str module might help (it provides regular expressions).

See also recent postings on this issue:

    Ruediger> 2.: A question on language design: why do recursive
    Ruediger> functions have to be marked explicitly as such?  [...]

Any (syntactically non-recursive) *expression* can appear on the right
hand side of let bindings, but this is not true for let rec bindings
which are restriced (syntactically) to functions and constant

see for more

(Historical note; many other languages require syntactic marking of
recursions: Scheme, Fortran90, PL1, ...)


email: basile<at>starynkevitch<dot>net 
aliases: basile<at>tunes<dot>org = bstarynk<at>nerim<dot>net
8, rue de la Faïencerie, 92340 Bourg La Reine, France

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