The well-known ST monad uses an ingenious hack to make it impossible for
distinct ST computations to interact with each other.
Is there a way to do something similar so that I can create cursors
that reference a (mutable) container, and then write a function that
takes two cursor arguments
On 16 March 2011 11:31, Andrew Coppin andrewcop...@btinternet.com wrote:
The well-known ST monad uses an ingenious hack to make it impossible for
distinct ST computations to interact with each other.
Is there a way to do something similar so that I can create cursors that
reference a
You could define a function:
withContainer ∷ (∀ s. Container s → α) → α
which creates a container, parameterizes it with an 's' that is only
scoped over the continuation and applies the continuation to the
created container.
Hmm, yes. That will work, but I wonder if there's some way of doing
I fail to see how does it limit the scope.
16.03.2011 15:05, Andrew Coppin пишет:
You could define a function:
withContainer ∷ (∀ s. Container s → α) → α
which creates a container, parameterizes it with an 's' that is only
scoped over the continuation and applies the continuation to the
Hi Andrew,
Andrew Coppin wrote:
You could define a function:
withContainer ∷ (∀ s. Container s → α) → α
which creates a container, parameterizes it with an 's' that is only
scoped over the continuation and applies the continuation to the
created container.
Hmm, yes. That will work, but I
Hmm, yes. That will work, but I wonder if there's some way of doing this
that doesn't limit the scope of the container to one single span of
code...
You can write helper functions which take containers as argument by
parameterizing these helper functions over s:
takesTwoContainers :: Container
On Wed, Mar 16, 2011 at 12:05:56PM +, Andrew Coppin wrote:
withContainer ∷ (∀ s. Container s → α) → α
Hmm, yes. That will work, but I wonder if there's some way of doing
this that doesn't limit the scope of the container to one single
span of code...
You can just pack the container into
On Wed, Mar 16, 2011 at 7:52 AM, Andrew Coppin
andrewcop...@btinternet.com wrote:
Hmm, yes. That will work, but I wonder if there's some way of doing this
that doesn't limit the scope of the container to one single span of
code...
You can write helper functions which take containers as
On 3/16/11 9:52 AM, Andrew Coppin wrote:
Hmm, yes. That will work, but I wonder if there's some way of doing this
that doesn't limit the scope of the container to one single span of
code...
You can write helper functions which take containers as argument by
parameterizing these helper
Hello haskell-cafe!
After making data Number = Zero | Succ Number an instance of
Integral, I wondered how I could do the same with galois fields. So
starting with Z mod p, I figured I'd need something like this
data GF = GF Integer Integer
so that each element of the finite field would
On Dec 20, 2007 9:34 AM, Adrian Neumann [EMAIL PROTECTED] wrote:
Hello haskell-cafe!
After making data Number = Zero | Succ Number an instance of
Integral, I wondered how I could do the same with galois fields. So
starting with Z mod p, I figured I'd need something like this
data GF = GF
11 matches
Mail list logo