<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE message PUBLIC
  "-//MLarc//DTD MLarc output files//EN"
  "../../mlarc.dtd"[
  <!ATTLIST message
    listname CDATA #REQUIRED
    title CDATA #REQUIRED
  >
]>

  <?xml-stylesheet href="../../mlarc.xsl" type="text/xsl"?>


<message 
  url="2006/02/123aec67dc0623c495431e677bee71af"
  from="Oliver Bandel &lt;oliver@f...&gt;"
  author="Oliver Bandel"
  date="2006-02-04T21:20:33"
  subject="From a recursive circuit to a functional/recursive OCaml-code..."
  prev="2006/02/cec1930e9867558a49deccc988a341df"
  next="2006/02/e53f4724f2819ce035bbef253c1ad50d"
  next-in-thread="2006/02/e53f4724f2819ce035bbef253c1ad50d"
  prev-thread="2006/02/99506d5ef7ec01d8ba9bb0294eb03130"
  next-thread="2006/02/b801b6e1958639194014abd51a4747a3"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="From a recursive circuit to a functional/recursive OCaml-code...">
<msg 
  url="2006/02/123aec67dc0623c495431e677bee71af"
  from="Oliver Bandel &lt;oliver@f...&gt;"
  author="Oliver Bandel"
  date="2006-02-04T21:20:33"
  subject="From a recursive circuit to a functional/recursive OCaml-code...">
<msg 
  url="2006/02/e53f4724f2819ce035bbef253c1ad50d"
  from="skaller &lt;skaller@u...&gt;"
  author="skaller"
  date="2006-02-05T02:29:21"
  subject="Re: [Caml-list] From a recursive circuit to a functional/recursive OCaml-code...">
<msg 
  url="2006/02/1cc4eb9caf947ecb2db08eeeab666e06"
  from="Oliver Bandel &lt;oliver@f...&gt;"
  author="Oliver Bandel"
  date="2006-02-05T04:16:45"
  subject="Re: [Caml-list] From a recursive circuit to a functional/recursive OCaml-code...">
<msg 
  url="2006/02/b32d0834fbcd7a60f3f0b85810c4df58"
  from="skaller &lt;skaller@u...&gt;"
  author="skaller"
  date="2006-02-05T05:42:57"
  subject="Re: [Caml-list] From a recursive circuit to a functional/recursive OCaml-code...">
<msg 
  url="2006/02/cad55e9864fd32dc1bca71af3652756c"
  from="Oliver Bandel &lt;oliver@f...&gt;"
  author="Oliver Bandel"
  date="2006-02-05T14:18:11"
  subject="Re: [Caml-list] From a recursive circuit to a functional/recursive OCaml-code...">
<msg 
  url="2006/02/bf71ca3b5daf28ccce08502c2ddb44c1"
  from="skaller &lt;skaller@u...&gt;"
  author="skaller"
  date="2006-02-05T16:05:58"
  subject="Re: [Caml-list] From a recursive circuit to a functional/recursive OCaml-code...">
<msg 
  url="2006/02/fd6ef9c32a1154859f9e54b6bb5cc903"
  from="Oliver Bandel &lt;oliver@f...&gt;"
  author="Oliver Bandel"
  date="2006-02-05T18:07:59"
  subject="Re: [Caml-list] From a recursive circuit to a functional/recursive OCaml-code...">
</msg>
</msg>
</msg>
<msg 
  url="2006/02/9b2c9649dc1d9a818d594d31a03a0cc3"
  from="Oliver Bandel &lt;oliver@f...&gt;"
  author="Oliver Bandel"
  date="2006-02-06T11:52:54"
  subject="Re: [Caml-list] From a recursive circuit to a functional/recursive OCaml-code...">
<msg 
  url="2006/02/75e2c039deb5f9ba01262efea3520cbd"
  from="Oliver Bandel &lt;oliver@f...&gt;"
  author="Oliver Bandel"
  date="2006-02-06T13:11:23"
  subject="Re: [Caml-list] From a recursive circuit to a functional/recursive OCaml-code...">
</msg>
</msg>
</msg>
<msg 
  url="2006/02/7f7e09a3fbd0f018ef0d3dc2ee681335"
  from="Bill Wood &lt;william.wood3@c...&gt;"
  author="Bill Wood"
  date="2006-02-05T05:55:56"
  subject="Re: [Caml-list] From a recursive circuit to a functional/recursive OCaml-code...">
<msg 
  url="2006/02/c119a7c5b3e0b302637e066205f9cab2"
  from="Frédéric_Gava &lt;gava@u...&gt;"
  author="Frédéric_Gava"
  date="2006-02-05T11:21:43"
  subject="Re: [Caml-list] From a recursive circuit to a functional/recursiveOCaml-code...">
</msg>
</msg>
<msg 
  url="2006/02/29419a2121fc6b9d34429f4b6bd67cc8"
  from="Oliver Bandel &lt;oliver@f...&gt;"
  author="Oliver Bandel"
  date="2006-02-05T23:24:42"
  subject="Re: [Caml-list] From a recursive circuit to a functional/recursive OCaml-code...">
<msg 
  url="2006/02/a7b29009021a2ec0bc7a53139a5e811a"
  from="Oliver Bandel &lt;oliver@f...&gt;"
  author="Oliver Bandel"
  date="2006-02-05T23:47:28"
  subject="Re: [Caml-list] From a recursive circuit to a functional/recursive OCaml-code...">
</msg>
<msg 
  url="2006/02/5e787d033f1ee4778e7d546ef0676403"
  from="skaller &lt;skaller@u...&gt;"
  author="skaller"
  date="2006-02-06T03:39:47"
  subject="Re: [Caml-list] From a recursive circuit to a functional/recursive OCaml-code...">
</msg>
</msg>
</msg>
</msg>
<msg 
  url="2006/02/03b9b5269e4dd4d9eaa994c3d3fac833"
  from="Oliver Bandel &lt;oliver@f...&gt;"
  author="Oliver Bandel"
  date="2006-02-05T11:46:35"
  subject="Re: [Caml-list] From a recursive circuit to a functional/recursive OCaml-code...">
</msg>
<msg 
  url="2006/02/ac8c0b52e160013bbec74e1efdf70e0f"
  from="Oliver Bandel &lt;oliver@f...&gt;"
  author="Oliver Bandel"
  date="2006-02-05T18:20:15"
  subject="Re: [Caml-list] From a recursive circuit to a functional/recursive OCaml-code...">
</msg>
</msg>
</thread>

<contents>

Hello,


how to implement a simple non-trivial machine (Heinz von Foerster)
in a purely functional manner?

With functional/recursive OCaml code?

I had written a mail with attachement (which contains a
jpeg with the structure of the circuit), but it seems it
was blocked or filtered away by the OCaml mailinglist software?!

So I try to give it as some formulas:


let u = func_B x e
let e = func_C u
let y = func_A x




I want to have y as a function of x (and x is read from stdin as int).
With each next input of x the next y should be calculated and printed
(maybe u and e also printing).

Normally - in the non-functional world - I would use
variables with a start-value and then iterate with
each input. So I had to save some values for some
calculations (call by value), so that I do not change
the values.
The functional way should make it unnecessary to save
the values. The functional programming paradigm should help here.

But it's a recursive process... or should I use iterations,
even if I use a functional language here?

Or, when using recursion, do i have to use mutual recursive functions
or recursive values here?!

Any hint is welcome.


TIA,
   Oliver

</contents>

</message>

