Hello Nicolas,
Saturday, May 2, 2009, 9:17:55 PM, you wrote:
> But now I don't know how to dynamically add new spells (new spells can be
> created in my gameplay). Since I can't assign a new value to the `spells'
> variable (Data.Map.insert returns a new map), I just don't know where to
> go.
we
To the original author: I must notice that this is not the most
convincing use of purity. I personally would prefer to have a
character's spell list be mutable because this corresponds better to
the nature of the problem (in the problem domain it is nonsense to
have two versions of a character and
Hi Nicolas,
Nicolas Martyanoff wrote:
So now I'd want to use it for a small project of mine, a simple
multiplayer roguelike based on telnet. I wrote a minimal server in C, and
it took me a few hours. Now I'm thinking about doing the same in Haskell,
and I'm in trouble.
I don't know if this is
don't think in terms of modifying state,
think of it as computing new values from old values. I find that the payoff
of learning to think ,like this is massive, as it's usually much easier to
reason about.
Indeed.
[warning: what follows is a rant with a purpose:]
The imperative/OO guys have
Welcome to Haskell! =)
> But now I don't know how to dynamically add new spells (new spells can be
> created in my gameplay). Since I can't assign a new value to the `spells'
> variable (Data.Map.insert returns a new map), I just don't know where to
> go.
Do distinguish *pure function* concept a
On Sat, May 2, 2009 at 6:17 PM, Nicolas Martyanoff wrote:
> Hi,
>
> I don't think I already presented myself; I'm Nicolas, a 23y french
> student, trying to learn and use haskell.
>
> I've been using C for years, for all sort of tasks, and am quite
> comfortable with it. I'm also using it 40h a we
At 7:17 PM +0200 5/2/09, Nicolas Martyanoff wrote:
Content-Type: multipart/signed; micalg=pgp-sha1;
protocol="application/pgp-signature"; boundary="ibTvN161/egqYuK8"
Content-Disposition: inline
Hi,
I don't think I already presented myself; I'm Nicolas, a 23y french
student, trying to le