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
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
Disregard that.. found it ;-) !! :>
Thx though
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
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,