>
> On Tue, Oct 12, 2010 at 8:56 AM, Uwe Schmidt wrote:
> >> No, but there is no point in using a formalism that adds complexity
> >> without adding functionality. Arrows are more awkward to use than
> >> monads because they were intentionally designed to be less powerful than
> >> monads in orde
2010/10/9 André Batista Martins Said:
>
> Might have not been clear, but i will try illustrate .
>
> f:: a-> b -> c -> (b,(c,a))
> f1 :: c -> a -> d
>
-
>
> I think I would attack this with glue consisting of:
comb f f1 a b c = arr (\(a,b,c) -> f a b c) >>> arr (\
On Tue, Jun 8, 2010 at 8:08 AM, Don Stewart wrote:
>
> (... There have been a few cases of major API / rewrites to famous old
> packages causing problems, including:
>
>* QuickCheck 1 vs 2
>* parsec 2 vs 3
>* OpenGL
> ...)
>
> (... * No additional breakages are introduced. ...)
>
The problem I see is that in both:
Version: September 2006 of hugs, which is the one that is current for
Ubuntu 9.10 release, and
ghci 6.10.4, they both exhibit a {I think} strange behaviour, in regards
to the shorthand way of calling out a list of enumerable values. I will
explain the problem th
On 8/8/07, Philippa Cowderoy <[EMAIL PROTECTED]> wrote:
>
> On Wed, 8 Aug 2007, peterv wrote:
> {...
> An editor that can be configured to display various inferred details,
> annotations and desugarings in the middle of the source would be useful
> for all kinds of purposes, and certainly not just
On 6/2/07, [EMAIL PROTECTED] <
[EMAIL PROTECTED]> wrote:
(... and showing an example of a simple-minded simplifier
and symbolic differentiator. The unification was presented as a powerful
pattern-matcher, being able to instanciate logic variables, and test the
coherence within patterns sharing t
On 2/21/07, Jules Bean <[EMAIL PROTECTED]> wrote:
Gene A wrote:
> Prelude> let revApply a f = f a
> Prelude> let rMap a fs = map (revApply a) fs
> Prelude> rMap 2 [(*4),(^2),(+12),(**0.5)]
> [8.0,4.0,14.0,1.4142135623730951]
>
Note that revApply here is precis
On 2/21/07, Henning Thielemann <[EMAIL PROTECTED]> wrote:
On Tue, 20 Feb 2007 [EMAIL PROTECTED] wrote:
> Paul Moore wrote:
> > I'm after a function, sort of equivalent to map, but rather than
> > mapping a function over a list of arguments, I want to map a list of
> > functions over the same a
On 2/10/07, Peter Berry <[EMAIL PROTECTED]> wrote:
Sigh, I seem to have done a reply to sender. Reposting to the list.
On 06/02/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I would like to create a Haskell function that generates a truth table,
for
> all Boolean values, say, us
On 2/15/07, Gene A <[EMAIL PROTECTED]> wrote:
Haskell solution:
build the array of all lower case with corresponding numbers starting with 1
Prelude> let lowerCaseTable = zip ['a'..'z'] [1..26]
A couple of functions:
Prelude> let box a = a:[]
Prelude>
On 2/13/07, keepbal <[EMAIL PROTECTED]> wrote:
For example,
(...
$arr['a']='1';
$arr['b']='2';
$arr['c']='3';
...) result:
a = 1
b = 2
c = 3
-
Haskell solution:
build the array of all lower case with corresponding numbers starting with 1
Prelude> let lowerCaseTable = zip ['a'..
On 12/11/06, Andrew Wagner <[EMAIL PROTECTED]> wrote:
> I think there are some great ideas here, and it would be a fantastic
> project to do as a community, via a wikibook.
..
On 12/11/06, Kirsten Chevalier <[EMAIL PROTECTED]> wrote:
there's not really a way to get a publisher to
On 11/30/06, Huazhi (Hank) Gong <[EMAIL PROTECTED]> wrote:
Thanks, it make sense here.
However, like I want to choose s[1,3,6,10] or something like this. Are there
some straightforward function or operator for doing this job? The !!
operator in haskell seems does not support multiple indecies.
Nicolas Frisby said:
{}
The fact of the matter is it's a rare case when a programmer's lack of
mathematical background threatens lives. If my GUI crashes, I'm angry
but not injured. Programmers make a living without the math background
because the vast majority of employers don't seek it--thei
Excerpt from Bulat Ziganshin :
i think that definitions with omitted arguments can be more hrd to
understand to newbie haskellers, especiallyones who not yet know the
language. as Tamas suggests, this page can be used to present to such
newbies taste of Haskell so listing all the parameters may a
John,
Thanks very much for that bit of insight. I am not really writing
anything right now that is in more hurry than what Haskell can handle
nicely. I was feeling a bit guilty as, Shao said, I use $ over (.)
and thought that my code could get some amount of ridicule as to
style... when it gets
Arie said:
{... This is an instance of a general conflict: should we sacrifice nice
notation for ease of learning? You could make a similar case for list
comprehensions, for example: they complicate matters for newcomers (yet
another meaning of brackets and pipe) ...}
I have to totally agree wi
hi,
Now, is there a speed or "cleaness of code" advantage to using the
function composition method using (.) :
putStrLn . return . head $ "This and that"
over the application method...using ($):
putStrLn $ return $ head "this and that"
some thoughts on that ... they both work.. but any advant
Hi All,
I got up this morning {after not much sleep} to find these very
helpful suggestions/comments:
from Scott Turner:
{... See: http://www.haskell.org/hawiki/ExistentialTypes ...}
From Bulat Ziganshin:
{...
you can read recent discussion on this in this topic, or look at
http://haskell.org
Lennart and all,
On 8/19/06, Lennart Augustsson <[EMAIL PROTECTED]> wrote:
There are much better ways than storing strings on the stack.
Like using a data type with constructors for the different types that
you can store.
-- Lennart
Off topic, but this is important info for me!
O
On 8/19/06, Henk-Jan van Tuyl <[EMAIL PROTECTED]> wrote:
Or you could use:
putStrLn [head "This and that"]
Gotta say I really like this ... running the head function inside of the list...
Okay so I can really learn something here... what would that look like
in "raw" monadic notation?
usin
The thread on the use of "show" and print to display an Int value,
brought up a problem I had early on... the one of cleanly displaying a
Char value, on a line all by itself.. My first attempts:
This was just plain hard to read: with the character t being where it was:
Prelude> putChar $ head "t
On 8/19/06, Brian Hulley <[EMAIL PROTECTED]> wrote:
{...
magSquared v = v.x*v.x + v.y*v.y + v.z*v.z
...}
Hi,
Won't the use of the "dot" lend confusion to the eye of the
beholder.. that as in the code fragment about that v.y or v.z is
implying function composition I'll admit to being pretty
Hi Lennart,
This morning when I posted..it was about 2:30am and had been up a
long time... bad habits.. I sent a message to Henk-Jan to that effect,
but didn't send to the entire list.. anyway thanks to both for the
followups... I still tend to sometimes do things the hard way in
Haskell. Start
Hi,
Here is a little thing I came up with to simulate the construct "for
x:= n1 to n2" and "for x:=n1 to n2 by n3" from purely imperative
world to use in Haskell, I call the functions fromto and fromtoby..
they also take a function which consumes the x component and uses it
in the computation.
25 matches
Mail list logo