Question: Write the following function in Haskell : 1. Write a function allUrls that given a text as a string, returns a list with all the

Write the following function in Haskell:

1. Write a function allUrls that given a text as a string, returns a list with all the web addresses in the text. We assume that each web address will start from http://

Test cases for URL method

allUrls "First URL is http://www.ucalgary.ca then try http://www.google.com"

OUTPUT: ["http://www.ucalgary.ca","http://www.google.com"]

allUrls "http://www.google.com is an efficient search engine."

OUTPUT: ["http://www.google.com"]

allUrls "There is no search engine in this list."

OUTPUT: []

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!