From 23ab6b0890626e7a6f081ca49aa1b5d3aea11887 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Fri, 22 Jan 2021 07:11:21 -0500 Subject: Add lisp-ish list singleton function --- Alpha.hs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'Alpha.hs') diff --git a/Alpha.hs b/Alpha.hs index 93308a0..c14f03f 100644 --- a/Alpha.hs +++ b/Alpha.hs @@ -55,6 +55,9 @@ module Alpha capitalize, lowercase, + -- * Lists + list, + -- * Data Validation require, @@ -69,7 +72,11 @@ import Data.String import Data.Text (Text) import qualified Data.Text as Text import qualified Data.Text.Lazy as LazyText -import Protolude as X hiding (($), (&), (.)) +import Protolude as X hiding (list, ($), (&), (.)) + +-- | Create a list. This should be @Data.List.singleton@ but that doesn't exist. +list :: a -> [a] +list a = [a] -- | Debugging printf say :: Text -> IO () -- cgit v1.2.3