Matt
It is not return, but the bind the one that does the miracle of
multiplication.
By its definition for the list monad, it applies the second term once for
each element are in the first term.
So return is called many times. At the end, bind concat all the small
lists generated
2013/7/20 Matt
Hi café,
I just spent the whole day fighting ghc and cabal to get my program
compiled in windows (and I haven't succeeded yet :) )
realgcc is not very happy about paths with spaces in them (I think
there's an open bug about the way ghc calls realgcc, which manifests
if you use extra-lib-dirs in t
On Tue, Jul 16, 2013 at 5:20 PM, Richard A. O'Keefe wrote:
> Brian Marick sent me a couple of his stickers.
> The one I have on my door reads "to be less wrong than yesterday".
> The other one I keep free to bring out and wave around:
>
> "An example would be handy about now."
Just by coi
On Sat, Jul 20, 2013 at 12:31 AM, Carter Schonwald
wrote:
> the tricky part then is to add support for other types.
>
> another approach to existentially package type classes with the data type!
>
> eg
> data HasEq = forall a . HasEq ( Eq a => a)
> or its siblinng
> data HasEq a = Haseq (Eq a =>
On Sat, Jul 20, 2013 at 12:14 AM, Michael Orlitzky wrote:
> For posterity, I report failure =)
Hi Michael,
It's fairly straightforward to generate the new data with template
haskell [1], and on the same page, section "10.7 'generic' zipWith" is
likely to be similar to your merging code.
[1]
For the sake of approaching this in yet another way, it can also be helpful
to substitute the definitions of bind and return in your expression. If we
start with the definitions:
instance Monad [] where
xs >>= f = concat (map f xs)
return x = [x]
Then we can make the following transformations
Should be fixed now. The wiki was recently transferred to a new server and
this got unfortunately broken in the process.
On 18 Jul 2013 22:45, "Henk-Jan van Tuyl" wrote:
>
>
> L.S.,
>
> It looks like the HaskellWiki images have disappeared; can anybody repair
> this? (See for example http://www.h
Hi all, here is a combined darcsden and darcs hub update.
darcsden 1.1 released
=
darcsden 1.1 is now available on hackage! This is the updated version
of darcsden which runs hub.darcs.net, so these changes are also
relevant to that site's users. (More darcs hub news below.)
-- data-fin 0.1.0
The data-fin package offers the family of totally ordered finite sets,
implemented as newtypes of Integer, etc. Thus, you get all the joys of:
data Nat = Zero | Succ !Nat
data Fin
You can define:
data EqDyn= forall a.(Typeable a, Eq a)=> EqDyn a
instance Eq EqDyn where
(EqDyn x) == (EqDyn y)= typeOf x== typeOf y && x== unsafeCoerce y
unsafeCoerce is safe synce the expression assures that types are equal
2013/7/20 adam vogt
> On Sat, Jul 20, 2013 at 12:31 AM, Carte
10 matches
Mail list logo