# Loops, Menus, Do Something, Save

**URL:** <https://forums.fsharp.org/t/loops-menus-do-something-save/2117>\
**Category:** General\
**Tags:** beginners\
**Created:** [January 11, 2022, 1:21am UTC](https://forums.fsharp.org/t/loops-menus-do-something-save/2117 "2022-01-11T01:21:02Z")\
**Posts on this page:** 2\
**Page:** 2

<div class="post-metadata">

**Author:** ![ntwilson](https://yyz2.discourse-cdn.com/flex030/user_avatar/forums.fsharp.org/ntwilson/32/984_2.png) [@ntwilson](https://forums.fsharp.org/u/ntwilson)\
**Post date:** [February 14, 2022, 11:35pm UTC](https://forums.fsharp.org/t/loops-menus-do-something-save/2117/22 "2022-02-14T23:35:22Z")

</div>

Yes you can using [mutually referential namespaces](https://devblogs.microsoft.com/dotnet/a-peek-into-f-4-1/#mutually-referential-types-and-modules-within-the-same-file). For example:

```auto
namespace rec X

open System

module B =
  let m1 = A.hello()

module A =

 let hello() =
    printfn "Hello world"

```

Note though that this feature was built so that modules A and B could reference each other, and not just so that you can re-order things how you wish. It’s not recommended to use this feature just as a way to re-order your definitions. It can really mess with the type inference and give hard-to-understand errors and warnings

---

<div class="post-metadata">

**Author:** ![Americore](https://yyz2.discourse-cdn.com/flex030/user_avatar/forums.fsharp.org/americore/32/1031_2.png) [@Americore](https://forums.fsharp.org/u/Americore)\
**Post date:** [February 23, 2022, 3:47am UTC](https://forums.fsharp.org/t/loops-menus-do-something-save/2117/24 "2022-02-23T03:47:52Z")

</div>

> [@ntwilson](#):
>
> this feature was built so that modules A and B could reference each other

Thanks, NT!! Just as a further note in order for a mutually referenced module to pass its functional exprsesions into the succeeding module you’ll need a goto type functioin such as with the let z = example.

```auto
namespace rec X

open System

module B =

  let y = "abc"
  printf "%A" y

  let z = A.test()
  z
 
module A =
open B

let e = B.y
printf "%A" e

```

[Previous page](https://forums.fsharp.org/t/loops-menus-do-something-save/2117.md?page=1)
