Since evaluation is lazy in Haskell, how about just creating a list of the actual strings?
showables = [ show 1, show "blah", show 3.14 ]
Related Contents:
- A monad is just a monoid in the category of endofunctors, what’s the problem?
- What is Weak Head Normal Form?
- Comparing Haskell’s Snap and Yesod web frameworks
- What is the purpose of the reader monad?
- Does GHC-mod have to use full names for types?
- Shorthand way for assigning a single field in a record, while copying the rest of the fields?
- Does Haskell require a garbage collector?
- How is this fibonacci-function memoized?
- Haskell error parse error on input `=’
- What is called and what does it do? [closed]
- mtl, transformers, monads-fd, monadLib, and the paradox of choice
- What is Levity polymorphism
- How to read this GHC Core “proof”?
- Divide Int to Int and return Int
- Difference between print and putStrLn in Haskell
- Profiling builds with Stack
- Haskell: how to map a tuple?
- How does non-strict and lazy differ?
- What is the difference between Pattern Matching and Guards?
- Haskell Weird Kinds: Kind of (->) is ?? -> ? -> *
- How do you use Control.Applicative to write cleaner Haskell?
- Defining a new monad in haskell raises no instance for Applicative
- Existential vs. Universally quantified types in Haskell
- Curry-Howard isomorphism
- runST and function composition
- Haskell’s ($) is a magic operator?
- What does the : infix operator do in Haskell?
- What does (f .) . g mean in Haskell?
- Accessing members of a custom data type in Haskell
- How are lists implemented in Haskell (GHC)?
- Future of roles for GADT-like type variables?
- Can I constrain a type family?
- Explanation of “tying the knot”
- Is there a type ‘Any’ in haskell?
- Is Haskell suitable as a first language?
- Why is catching an exception non-pure, but throwing an exception is pure?
- When is the difference between quotRem and divMod useful?
- Is there any reason not to use the INLINABLE pragma for a function?
- Is everything in Haskell stored in thunks, even simple values?
- Accessing a Specific Element in a Tuple
- What is the connection between laziness and purity?
- Why should Applicative be a superclass of Monad?
- What is fusion in Haskell?
- Real world use of GADT
- Is there a Haskell code formatter?
- Haskell tuple constructor (GHC) and the separation between a language and its implementation
- Restricting string literals to Text only
- Lazy evaluation of terms in an infinite list in Haskell
- How do you identify monadic design patterns?
- Haskell syntax for ‘or’ in case expressions