On Feb 27, 2006, at 2:30 PM, David F.Place wrote:
Hi,
I'm a newish Haskell hacker with way too much experience hacking
Lisp.At first, I found my Haskell code looking very lisp-y. I
think my code is becoming more idiomatic haskell. I would be very
grateful to anyone who would take
On Feb 27, 2006, at 3:11 PM, Robert Dockins wrote:
-- Nested tuple and lists types are pretty hard to read. In your
code [([k],v)] appears a lot. Consider defining a type alias for it.
Funny, of course as an inveterate lisp hacker, I am completely
insensitive to nesting depth. :-)
David F.Place wrote:
[snip]
partList :: Ord k = [([k],v)]-[k]-[(k,[([k],v)])]
partList pairs alphabet = reverse . fst $ foldl' f ([],pairs) alphabet
where f (result,pairs) l = (result',rest)
where (part,rest) = span ((==l) . head . fst) pairs
result' = if null part
On Feb 27, 2006, at 5:54 PM, Brian Hulley wrote:
there is a parse error (using ghc) at the line beginning with
result'. This binding doesn't line up with anything. Also the
second 'where' is dangerously close to the column started by the
'f' after the first 'where' (may not be noticeable
David F. Place wrote:
On Feb 27, 2006, at 5:54 PM, Brian Hulley wrote:
there is a parse error (using ghc) at the line beginning with
result'. This binding doesn't line up with anything. Also the
second 'where' is dangerously close to the column started by the
'f' after the first 'where' (may
David F.Place wrote:
partList :: Ord k = [([k],v)]-[k]-[(k,[([k],v)])]
partList pairs alphabet = reverse . fst $ foldl' f ([],pairs) alphabet
where f (result,pairs) l = (result',rest)
where (part,rest) = span ((==l) . head . fst) pairs
result' = if null part
On 27/02/06, David F. Place [EMAIL PROTECTED] wrote:
On Feb 27, 2006, at 5:54 PM, Brian Hulley wrote:
there is a parse error (using ghc) at the line beginning with
result'. This binding doesn't line up with anything. Also the
second 'where' is dangerously close to the column started by