Making the basic accumulator in Real World OCaml use Async
It is totally idiomatic and pretty code. My personal style is to put the pipe operators to the end, as they are, at their essence, just functional semicolons, e.g.,

let read_and_accumulate () =
  Reader.lines (Lazy.force Reader.stdin)  |&gt; 
  Pipe.filter ~f:(Fn.non String.is_empty) |&gt; 
  Pipe.map ~f:Float.of_string |&gt; 
  Pipe.fold ~init:0. ~f:(fun x y -&gt; return (x +. y))


With such approach every line starts with a word, not the punctuation that helps the readability. 

What concerning the compose function, it didn't work for you because (+.) is binary (in fact it is not binary, but it is a function that returns a function). So, when you compose a return function that has type 'a -&gt; 'b, with some function f : 'c -&gt; 'c -&gt; 'c, then you actually has a type ('c -&gt; 'c) -&gt; 'b, where ('c -&gt; 'c) is the return type of function f. Note, the parenthesis. The ('c -&gt; 'c) -&gt; 'b is not equivalent to 'c -&gt; 'c -&gt; 'b. The first type describes a function, that takes a function and returns a value (i.e., apply-style function), and the latter type describes a function that take a value, and returns a function, that takes another value and computes the result (the curried binary function).