Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
shrughes
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
40 ms
·
361.
▲
by
shrughes
18y ago
I would nominate RSA.
362.
▲
by
shrughes
18y ago
But how did it change the world? There are plenty of other usable sorting algorithms.
363.
▲
by
shrughes
18y ago
Then maybe I'm misunderstanding the point of your reply. I was pointing out how monads are inconvenient to use in strictly evaluated languages. Why did you follow up with an example about how not using monads is convenient?
364.
▲
by
shrughes
18y ago
Neither of your translations convert your code to anything that has to do with monads , and your first translation is just plain broken. Your print-n-times doesn't return an action---it's an imperative function that performs an action. The
365.
▲
by
shrughes
18y ago
Another reason monads are cumbersome in other languages is that other languages use lazy evaluation. If you consider the naively implemented function skipMany :: Parser a -> Parser () skipMany p = (p >> skipMany p) &#
366.
▲
by
shrughes
18y ago
What version of GHC (or of the libraries) do you have? (Either String) should be a monad as specified through Control.Monad.Error: instance Error e => Monad (Either e) where ... I didn't consider Data.Map.fromListWith;
367.
▲
by
shrughes
18y ago
http://paste.lisp.org/display/74007 let Right x = paramTree [("a[x]","b"),("a[b]","c"), ("a[b][c]","d"),("bc[de]","f")] in putStrLn (drawTree x) { "a" => { "b" => <conflict>, "x" => "b" }, "bc" => {
368.
▲
by
shrughes
18y ago
I'd be happy to write you an example if you specified more clearly than the linked website what the problem is.