silly question on \n

2000-04-28 Thread Sitzman
Hey all.. Gosh, this feels embarrassing to ask.. but how do I get a string to print out with a carriage return in it? (like using \n in c++)... I want > listBooks :: [Book] -> [String] > listBooks [] = [] > listBooks (Book lang year last first title:bs) > = (lang++","++year++","++last++","++fi

Binary Search Tree debugging

2000-04-17 Thread Sitzman
Hey all.. I was wondering if somebody might offer me some assistance in trying to debug some code I wrote to check whether a tree is a binary search tree.. For some reason it always comes back as false! :( Thanks much! -Andrew Sitzer > isBST :: Ord a => Tree a -> Bool > isBST thetree > | isNil

Re: lst[x]

2000-04-07 Thread Sitzman
Disregard that.. found it ;-) !! :> Thx though

lst[x]

2000-04-07 Thread Sitzman
Hey all.. I imagine this is probably a silly question, but I was wondering, is there a getElementAt function (or operator) that will return the nth element in a list? ie say I had a list called lst... I would like to say lst[2] and get back the 2nd element in that list... or, alternatively, to h

lists

2000-04-01 Thread Sitzman
Hey all.. I was wondering if somebody might give me some pointers on how to do a particular assignment.. I need to write a scipt zipPairtype L1 L2 which takes 2 lists and returns a list of pairs... such thar: > zipPairtype [1,2] [11,12,100] [Pair 1 11, Pair 2 12] >zipPairtype [1,2,3] [100,