?
Solved

Haskell Question

Posted on 2002-05-26
5
Medium Priority
?
180 Views
Last Modified: 2010-04-16
Hi
I got a Haskell exam in a few days and doing the pastpaper of it. Since the anwer of it is not given
it would be very helpful if anyone could check some of my answer which I am not sure about, and answer
the questions which I have no idea...
Thank you very much
asukai



(a) What is a qualified type in Haskell?
My answer:
Qualified type is a type which consist of more than one type. For instance, Integral a=> a-> a is a
qualified type where Integral is type class whose element is int and Integer.

(b) What are the types of the following Haskell functions?
(i) one x y = x < y
My answer:
Boolean
(ii) two x y = x + y
Real
(iii) three x y = xy
Real

(iv) four x y = x + + y
List
(v) five x y = x ! ! y
An element of List. Eq. (not sure)
(vi) six x y = x = = y
boolean.

(c) In the context of a functional programming language what is a homomorphism?

No idea.
(a) Discuss the advantages and disadvantages of pure functional programming
languages as compared with other sorts of language.

Advantages:
Good programming practise.
Simpler and shorter code.

Anything else?

Disadvantages:
Not flexible.
Strict Syntax. Need to specify type for each function.
Limited libeary.
It only deals with calculation problem.
Anything else?
0
Comment
Question by:asukai
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 6

Expert Comment

by:Triskelion
ID: 7048235
According to this page:
http://www.haskell.org/tutorial/functions.html

the ++ is "infix"

For number two, are you looking for "add" or "Lambda Abstractions"?

Check out these pages:
   http://www.cse.unsw.edu.au/~paull/cs1011/inbuilt.html
   http://cs-sa0.wwc.edu/~cs_dept/KU/PR/Haskell.html
0
 
LVL 6

Accepted Solution

by:
Triskelion earned 400 total points
ID: 7048264
0
 
LVL 2

Expert Comment

by:dech
ID: 7186969
(v) five x y = x ! ! y
An element of List. Eq. (not sure)
----------------------------------
type of list x


Advantages:
Good programming practise.
Simpler and shorter code.

Anything else?
----------------------------------
Ability to follow mathmatical arguments? (maybe)
I disagree with good programming practise, good recursion practise maybe, not general programming practise.


(c) In the context of a functional programming language what is a homomorphism
----------------------------------
I forgot!!

Dech

0
 

Expert Comment

by:CleanupPing
ID: 9314523
asukai:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0

Featured Post

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This month, Experts Exchange’s free Course of the Month is focused on CompTIA IT Fundamentals.
A bad practice commonly found during an account life cycle is to set its password to an initial, insecure password. The Password Reset Tool was developed to make the password reset process easier and more secure.
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses
Course of the Month7 days, 19 hours left to enroll

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question