PDA

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

View Full Version : Haskell Problem - functional language!


Wyman
April 13, 2002, 12:30 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!