From 90a521c78f036e024454df39c3e3cd1180c90a74 Mon Sep 17 00:00:00 2001 From: William Carroll Date: Tue, 28 Jul 2020 18:46:05 +0100 Subject: Create Utils module for (|>) operator For the past 3-4 Haskell projects on which I've worked, I've tried to habituate the usage of the (&) operator, but I find that -- as petty as it may sound -- I don't like the way that it looks, and I end up avoiding using it as a result. This time around, I'm aliasing it to (|>) (i.e. Elixir style), and I'm hoping to use it more. --- src/Utils.hs | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 src/Utils.hs (limited to 'src/Utils.hs') diff --git a/src/Utils.hs b/src/Utils.hs new file mode 100644 index 000000000000..78ee93ec95de --- /dev/null +++ b/src/Utils.hs @@ -0,0 +1,8 @@ +-------------------------------------------------------------------------------- +module Utils where +-------------------------------------------------------------------------------- +import Data.Function ((&)) +-------------------------------------------------------------------------------- + +-- | Prefer this operator to the ampersand for stylistic reasons. +(|>) = (&) -- cgit 1.4.1