Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] actualize a string
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Flavio Leonardo Cavalcanti de Moura <flavio@m...>
Subject: [Caml-list] actualize a string
	I am trying to build a procedure such that some reductions are
performed while a list (of redex) is not empty. The problem is that a
new list is needed at each step otherwise it will loop for ever. The
actual code is

let normal exp =
 let l = exp :: [] in
 while (matchingApp exp [] []) <> [] do
       exp := (appreduction exp (hd (matchingApp exp [] [])));
       exp :: l done; l;;

After the 'while' I would like to actualize the expression 'exp' with the
string (appreduction exp (hd (matchingApp exp [] []))). The problem is
that with := it does not work. How can I do that? I couldn't find anything
in the ocaml manual.

	Best regards,
  	Flávio Leonardo.


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