title: fp-ts Using async function in middle of pipe
body: <p>I have 3 functions, <code>f1</code>, <code>f2</code>, <code>f3</code>.</p>
  
  <p><code>f1</code> and <code>f3</code> are sync and return <code>Option&lt;string&gt;</code> but <code>f2</code> is an async function return <code>Promise&lt;Option&lt;string&gt;&gt;</code>.</p>
  
  <p>How should I use these three functions in a single pipe?</p>
  
  <p>Here is my code:</p>
  
  <pre><code>import {some, chain} from 'fp-ts/lib/Option';
  import {pipe} from 'fp-ts/lib/pipeable';
  
  const f1 = (input: string) =&gt; {
      return some(input + " f1")
  };
  const f2 = async (input: string) =&gt; {
      return some(input + " f2")
  };
  const f3 = (input: string) =&gt; {
      return some(input + " f3");
  };
  
  const result = pipe(
      "X",
      f1,
      chain(f2),
      chain(f3),
  );
  
  console.log("result", result);
  </code></pre>