title: why are previously defined methods not available in a module in fsharp?
body: <p>Seq.toMap is not recognized in the inner invocation of the toMap2 function</p>
  
  <pre><code>open System
  open Microsoft.FSharp.Collections
  
  module Seq =
     let toMap(seqinit:seq&lt;'a*'T&gt;) = 
        seqinit |&gt; Map.ofSeq
  
     let toMap2(seqinit:seq&lt;'a*seq&lt;'b*'T&gt;&gt;) = 
        seqinit |&gt; Seq.map (fun (key1 ,seq1) -&gt; (key1, seq1 |&gt; Seq.toMap )) 
                |&gt; Map.ofSeq
  </code></pre>
  
  <p><strong>UPDATE</strong></p>
  
  <p>a better functional code would be (with initial pb solved as Ramon Snir suggested)</p>
  
  <pre><code>let inline (||&gt;) (seqinit:seq&lt;'a*'T&gt;) f = 
         seqinit |&gt; Seq.map  (fun (key1 ,seq1) -&gt; (key1, seq1 |&gt; f ))
  
  let toMap  (seqinit:seq&lt;'a*'T&gt;)                 =  seqinit |&gt; Map.ofSeq
  let toMap2 (seqinit:seq&lt;'a*seq&lt;'b*'T&gt;&gt;)         =  seqinit ||&gt; toMap  |&gt; toMap
  let toMap3 (seqinit:seq&lt;'a*seq&lt;'b*seq&lt;'c*'T&gt;&gt;&gt;) =  seqinit ||&gt; toMap2 |&gt; toMap
  </code></pre>