Using perfectly formatted input as list in Haskell
Posted
by RankWeis
on Stack Overflow
See other posts from Stack Overflow
or by RankWeis
Published on 2010-05-17T21:51:57Z
Indexed on
2010/05/17
22:00 UTC
Read the original article
Hit count: 235
I'm doing a program in Haskell (on the Haskell platform), and I know I'm getting perfectly formatted inputs, so the input may look like
[ ['a'], ['b'], ['c'] ]
I want Haskell to be able to take this and use it as a list of it's own. And, I'd like this list to be over multiple lines, i.e., I want this to also work:
[
['a'],
['b'],
['c']
]
I can parse this input, but I've been told there's a way to do this easily - this is supposed to be the 'trivial' part of the assignment, but I don't understand it.
© Stack Overflow or respective owner