streamly
streamly copied to clipboard
Change the stream construction operators
Currently we use .: for pure stream construction and |: for monadic stream construction. I am contemplating on changing these and using this scheme:
Pure list: 1 :> 2 :> Nil for 1 `Cons` 2 `Cons` Nil
Pure stream: 1 >: 2 >: nil for 1 `cons` 2 `cons` nil
Monadic stream: getLine >>: getLine >>: nil for `getLine `consM` getLine `consM` nil
I especially like the >>: as it is a hybrid of the monadic bind >> and list construction : and therefore a natural choice for monadic list.
We can also use :< for pure list, symmetrically opposite to pure stream.