diff options
author | Ben Sima <ben@bsima.me> | 2021-01-22 07:11:21 -0500 |
---|---|---|
committer | Ben Sima <ben@bsima.me> | 2021-01-22 08:00:27 -0500 |
commit | 23ab6b0890626e7a6f081ca49aa1b5d3aea11887 (patch) | |
tree | 77f645d5149c13bfad781c7f60db44cc9c3881aa | |
parent | f12a68cde2bd86496a82c532e848d273f4e49065 (diff) |
Add lisp-ish list singleton function
-rw-r--r-- | Alpha.hs | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -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 () |