David Menendez wrote:
Here's another one:
addTriple (s,p,o) = addArc s p o . addNode s . addNode p . addNode o
I like to think it's pretty straightforward.
I suppose you could argue that these are examples of "semi-point-free"
style, or something. Certainly, I wouldn't want to rewrite tsArcFwd
Henning Thielemann wrote:
Since I couldn't find one, I started one on my own:
http://www.haskell.org/hawiki/ThingsToAvoid
I consider 'length', guards and proper recursion anchors.
Very interesting. It would be nice to have reasoning for the n+k
patterns thing. Guidelines that say 'don't do this' w
[EMAIL PROTECTED] wrote:
I've got a general new person type question.
I understand that I can hide a function in a module that I am importing
if it conflicts with another identical function name.
But if the situation arises that I would like to use two identically
named functions from two differen
mattr wrote:
Haskell is still a very dynamic language - there is still much room for
it to grow and improve. In that sense, it is still young.
Perl and Python and Ruby have hit middle age - no more growing, just
more bulk accumulating around the middle.
Or in Perl's case, a seriously ambitious
Simon Peyton-Jones wrote:
| I also have a very small start on a "haskell for hackers" ("hackers"
in
| the non-evil sense) sort of document. One this doesn't ignore I/O as
| "hard" or "unimportant". I/O in Haskell doesn't suck. It's just that
a
| lot of people in the community don't have it as a
Ben Rudiak-Gould wrote:
Keean Schupke wrote:
> At the risk of getting off topic... the reason 'C' has printf is because
> it is not polymorphic. Printf is a hack to allow different types to be
> printed out, such that they did not need printInt, printFloat etc.
Many language have printf-like fun
Isn't Happy [1] a bottom-up parser generator in the style of yacc?
[1] http://www.haskell.org/happy/
As for parsing yacc's input files, if you can come up with an EBNF
grammar for it that avoids some of the nasty recursion possibilities [2]
then I can't see why you couldn't parse it with Parsec
Jim Lewis wrote:
I'm new to Haskell and can't find an example to solve a trivial problem.
I have code like this:
findBlank :: [] -> Int
findBlank str = findIndex (==' ') str
But interpreter complains elsewhere of mismatch of Int with Maybe Int. I want to handle the maybe only here and nowhere els