PDA

You are currently viewing a search engine-friendly (archive) version of this page.

View Full Version : Haskell Problem


Wyman
April 13, 2002, 12:34 am
Can anyone help me with writing a code
for haskell which tells u if a list entered is an Arithmetic Progression (returns true) or not (returns false)

ie. ap [3, 4, 5, 6]
true
ap [1, 7, 4, 5]
false

the type signature to use is
ap :: [Int] -> Bool
please reply asap. as it is very important
thanks!

MikeFoster
April 13, 2002, 01:33 pm
Hi Wyman, Welcome to HelpFromTechs!

I had not heard of the Haskell language, but after some searches on Google I find it to be very interesting.

Since I have no experience with Haskell I'm afraid I can't help you right away. Feel free to post more Haskell code and I'll try to help.

Thanks