display a list differently Haskell? -


hey wandering if possible show list:

["one", "two", "three"] 

to shown as

"one", "two", "three" 

need done file

thanks

you can intercalate data.list

 showlist :: show => [a] -> string  showlist = intercalate ", " . map show 

the map show converts each element it's string representation quotes (and internal quotes escaped), while intercalate ", " inserts commas , spaces between pieces , glues them together.


Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -