Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6018219
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T03:14:36+00:00 2026-05-23T03:14:36+00:00

displayContacts :: Contact ->[String] displayContacts [] = [] displayContacts (x :xs) = [show (x)]

  • 0
displayContacts         :: Contact ->[String]

displayContacts []      =   []

displayContacts (x :xs) =    [show (x)] ++  displayContacts (xs)

after performing above function following result showing with exta “\” why is that and how to overcome this

["(\"Fazaal\",\"Naufer\",7712345678)","(\"Tharanga\",\"Chandasekara\",779876543)"," 
(\"Ruaim\",\"Mohomad\",7798454545)","(\"Yasitha\",\"Lokunarangoda\",7798121212)","
(\"Rochana\",\"Wimalasena\",779878787)","(\"Navin\",\"Dhananshan\",77987345678)","
(    \"Akila\",\"Silva\",7798123123)","(\"Sudantha\",\"Gunawardana\",779812456)"]

i want to display this as “Fazaal” “Naufer” 7712345678 likewise

in my function contact is list of tupples :- [(“Isuru”,”Ranaisnghe”,123)]

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T03:14:37+00:00Added an answer on May 23, 2026 at 3:14 am

    When you show a string, show "hello", the show instance for String adds in quotes, which are escaped when GHCi prints out a data structure.

    There are a few solutions, depending on what your goal is. If you just want cleaner output in GHCi then:

    putStrLn $ unlines $ displayContacts contact
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to create a template function that takes a vector argument of any
I wrote this report to display how long it takes a user to finish
hi friends i have i am showing some data via ajax on my page
here i used this code to display contacts with check boxes.... SimpleCursorAdapter adapter =
I have a function to get the values of the selected check-box from the
I am developing Listview where Multiple selection is possible,now the problem is when i
I followd the android tutorial from: Android Develoer - CursorLoader example Im getting the
I want to use a Preferences screen, but insert into it a ListActivity in
I have database called wisherDB, and I have a table called tbltasks inside the
I am using GWT for my client side application. However, I am not sure

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.