bytecode language for the browser; something that can be JITted
efficiently while guaranteeing safety/security. This way, the
compilation chain
Haskell - bytecode - browser
would finally be viable.
Best regards,
Heinrich Apfelmus
--
http://apfelmus.nfshost.com
David Barbour wrote:
Heinrich Apfelmus wrote:
Even then, events and behaviors are one abstraction level too low. In my
opinion, you are better off with a library/approach geared directly towards
incremental computations.
I believe behaviors are precisely the 'right' abstraction if the goal
are better off with a library/approach geared directly towards
incremental computations.
[1]: http://haskell.org/haskellwiki/Reactive-banana
Best regards,
Heinrich Apfelmus
--
http://apfelmus.nfshost.com
___
Haskell-Cafe mailing list
Haskell-Cafe
Or equivalently:
evalState (sequence . repeat . state $ \s - (s,s+1)) 0
Thanks, I've changed it.
Best regards,
Heinrich Apfelmus
--
http://apfelmus.nfshost.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo
Tutorial
http://apfelmus.nfshost.com/articles/operational-monad.html
The link to the Cont monad is explained at the very end.
Best regards,
Heinrich Apfelmus
--
http://apfelmus.nfshost.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http
was using the names for a Show instance. I am assuming there is no
syntax sugar to recover the name of the variable used in a binder as a
String.
Ah, good point. There is no referentially transparent way to recover the
name of a variable.
Best regards,
Heinrich Apfelmus
--
http
regards,
Heinrich Apfelmus
--
http://apfelmus.nfshost.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
- a
- showDouble :: Double - String
+ showDouble :: Floating a = a - String
will break the program
foo :: String - String
foo = showDouble . read
That said, is it true that *removing* a class constraint will never
cause ambiguities?
Best regards,
Heinrich Apfelmus
--
http
introducing this change?
Best regards,
Heinrich Apfelmus
--
http://apfelmus.nfshost.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
happens if you change it to
map_ applyAction sas
return [1..100]
? If this still throws a stack overflow, then problem is in the part of
the code that consumes said list.
Best regards,
Heinrich Apfelmus
--
http://apfelmus.nfshost.com
and
code. I interpret this as a sign that my library is easy to understand
(if you know Applicative Functors, that is) even though a key part of
the documentation is still missing.
Best regards,
Heinrich Apfelmus
--
http://apfelmus.nfshost.com
, the resulting text will be very useful to readers with a high
attention span, too.)
Best regards,
Heinrich Apfelmus
--
http://apfelmus.nfshost.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell
is that you can use one and the
same finger tree implementation for a variety of data structures.
Practically every tree-based data structure can be obtained this way.
See also
http://apfelmus.nfshost.com/articles/monoid-fingertree.html
Best regards,
Heinrich Apfelmus
--
http
is equal in
expressiveness to the approach I took in reactive-banana .
Best regards,
Heinrich Apfelmus
--
http://apfelmus.nfshost.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Heinrich Apfelmus wrote:
Dear Haskellers,
Can GUI programming be liberated from the IO monad? Functional Reactive
Programming (FRP) promises as much, and I'm trying to make this dream a
reality with my [reactive-banana][] library. Having released version
0.4.0.0, I am now looking for example
Henning Thielemann wrote:
Heinrich Apfelmus wrote:
Could you expand a little on your arrow-like stream processors? What
do the arrows look like,
data SF a b = SF (a - (b, SF a b))
?
My stream processors are not Arrows, because 'first' cannot be
implemented. However, 'arr' and '.' can
Henning Thielemann wrote:
Heinrich Apfelmus wrote:
Question: how would you actually like to describe the guitar simulator
at a high-level? Did you already wish for some specific combinators?
Assume that you had something like reactive-banana available and
imagine that there were a benevolent
Haskell, the latency is just too big.
Best regards,
Heinrich Apfelmus
--
http://apfelmus.nfshost.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
David Virebayre wrote:
Heinrich Apfelmus:
I want to hear!
Just a description. :) You can also mention why you find it interesting etc.
Well I have an old program sitting around. Anyway, it's very simple :
The GUI has
- a window with a menu bar, 2 directory selects (source and dest
Henning Thielemann wrote:
Heinrich Apfelmus wrote:
Can GUI programming be liberated from the IO monad? Functional
Reactive Programming (FRP) promises as much, and I'm trying to make
this dream a reality with my [reactive-banana][] library. Having
released version 0.4.0.0, I am now looking
/2008/06/21/zipedit/
[hbeat]: http://dockerz.net/twd/hBeat
[midi streams]: http://hackage.haskell.org/package/streamed
[hwn]: http://www.haskell.org/haskellwiki/Haskell_Weekly_News
Best regards,
Heinrich Apfelmus
--
http://apfelmus.nfshost.com
David Virebayre wrote:
Heinrich Apfelmus wrote:
Do you know any *small GUI programs* that you would *like* to see
*implemented with Functional Reactive Programming?*
I may have an example.
I want to hear!
I would love to hear your examples, so that I can try to convert them to FRP
style
Jason Dagit wrote:
Heinrich Apfelmus wrote:
Do you know any *small GUI programs* that you would *like* to see
*implemented with Functional Reactive Programming?*
I would love to hear your examples, so that I can try to convert them to FRP
style and test my library against them!
How about
Ketil Malde wrote:
Heinrich Apfelmus writes:
Do you know any *small GUI programs* that you would *like* to see
*implemented with Functional Reactive Programming?*
I don't know if this fits the bill, but a tool that I'd like to see is
plotting for one or more live streams of data. I guess I
Chris Smith wrote:
Heinrich Apfelmus wrote:
Do you know any *small GUI programs* that you would *like* to see
*implemented with Functional Reactive Programming?*
This isn't really a specific application, but what I'd like to see most
from FRP is an example of something that involves moving
Dmitriy Nikitinskiy wrote:
Heinrich Apfelmus пишет:
Do you know any *small GUI programs* that you would *like* to see
*implemented with Functional Reactive Programming?*
Maybe realize on FRP one of following bored examples:
CRUD table: create, update, delete records in table (for example
,
Heinrich Apfelmus
--
http://apfelmus.nfshost.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
that simultaneity happen.
Best regards,
Heinrich Apfelmus
--
http://apfelmus.nfshost.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
ghc-pkg hide offending-package
Best regards,
Heinrich Apfelmus
--
http://apfelmus.nfshost.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
look now, thanks for the suggestion.
I'm currently working on a variant of Elliott's and Hudak's original FRP
model. See also:
http://hackage.haskell.org/package/reactive-banana
http://apfelmus.nfshost.com/blog.html#functional-reactive-programming-frp
Best regards,
Heinrich Apfelmus
, the examples
WebSessionState.lhs
TicTacToe.hs
PoorMansConcurrency.hs
show how to suspend and resume the control flow. Feel free to request
additional examples.
Best regards,
Heinrich Apfelmus
--
http://apfelmus.nfshost.com
___
Haskell
Emil Axelsson wrote:
Heinrich Apfelmus wrote:
Since every module of my DSL depends on the same
global variable, only two things should happen:
* Reloading a module does not reload the global counter. Everything is
fine.
* Reloading a module does reload the global counter. This forces *all
know whether that's the best way to go about it. It's worth trying, but
keep in mind that the goal is to have an expressive set of combinators,
not to shoehorn everything into monads.)
Best regards,
Heinrich Apfelmus
--
http://apfelmus.nfshost.com
on polymorphic combinators.
Best regards,
Heinrich Apfelmus
--
http://apfelmus.nfshost.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Apfelmus
--
http://apfelmus.nfshost.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
would love the ability to install it
locally and to link to it from the Haddock documentation.
[1]: http://hackage.haskell.org/package/operational
[2]: http://projects.haskell.org/operational/Documentation.html
Best regards,
Heinrich Apfelmus
--
http://apfelmus.nfshost.com
cross-platform GUI toolkits is that they
embed a lot of wisdom about platform quirks (Cocoa is particularly
annoying) that you would have to solve again.
Best regards,
Heinrich Apfelmus
--
http://apfelmus.nfshost.com
___
Haskell-Cafe mailing list
problem is that ghci is unable to link
libstdc++. But the crash problem is probably still there.
Best regards,
Heinrich Apfelmus
--
http://apfelmus.nfshost.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo
be worth to include the extra hoops (EnableGUI) in the GLFW
package.
Best regards,
Heinrich Apfelmus
--
http://apfelmus.nfshost.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Apfelmus
--
http://apfelmus.nfshost.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Apfelmus
--
http://apfelmus.nfshost.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
on the
Producer/Transformer/Consumer trilogy.
I'd love to hear thoughts on the issue, especially from David.
I vastly prefer the names Producer/Transformer/Consumer over the others.
Then again, I never quite understood what Iteratees were all about in
the first place.
Best regards,
Heinrich Apfelmus
Ryan Ingram wrote:
Heinrich Apfelmus wrote:
However, even in a demand-driven implementation, there is one optimization
that I would like make: when there are multiple external events, say e1 and
e2, the network splits into subnetworks that react only to one of the
inputs. For instance, your
Ryan Ingram wrote:
Apfelmus, I hope you don't abandon your efforts, at least for the selfish
reason that I enjoy reading your blog entries about trying to implement it!
:D My reasoning was that a temporary demand-driven implementation would
allow me to release the library sooner; I want
://apfelmus.nfshost.com/blog/2011/04/24-frp-push-driven-sharing.html
Best regards,
Heinrich Apfelmus
--
http://apfelmus.nfshost.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
obligation! (At least, I don't see any obvious one. Maybe a clever abuse
of parametricity helps.) It might be an option in Agda, though.
In that light, it is entirely reasonable that you have to use
unsafePerformIO .
Best regards,
Heinrich Apfelmus
--
http://apfelmus.nfshost.com
that way. At some
point, you need something that works at another level than pure
functions. What the *hell* do you do?
I think a better invective would be amazing.
Best regards,
Heinrich Apfelmus
--
http://apfelmus.nfshost.com
___
Haskell-Cafe
with this is that I need the FlexibleContexts extension to
do that. There goes Haskell2010 compatibility.
Best regards,
Heinrich Apfelmus
--
http://apfelmus.nfshost.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman
of IO, it is a bit harder to test
automatically, so the model might be useful to have.
Best regards,
Heinrich Apfelmus
--
http://apfelmus.nfshost.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo
://hackage.haskell.org/package/hmatrix
Best regards,
Heinrich Apfelmus
--
http://apfelmus.nfshost.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
,
Heinrich Apfelmus
--
http://apfelmus.nfshost.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
that GHC has long supported existential types, just not the
explicit syntax.
Regards,
Heinrich Apfelmus
--
http://apfelmus.nfshost.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
to wrestle with the existential types for
takeC and dropC a bit, but that shouldn't be much of a problem. For
instance, you can fuse these functions into runLayers and hide the
existential types somewhere in the recursion.
Regards,
Heinrich Apfelmus
--
http://apfelmus.nfshost.com
quantification ). You have to encode it in some way, for instance with a
data type
data Exists f = forall c . Exists (f c)
takeC :: Int - Compoz a b - Exists (Compoz a)
Regards,
Heinrich Apfelmus
--
http://apfelmus.nfshost.com
___
Haskell-Cafe
, though.
Regards,
Heinrich Apfelmus
--
http://apfelmus.nfshost.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
. Admittedly, I don't know how many people
actually do so...
I did, I did!
http://projects.haskell.org/operational/Documentation.html#proof-of-the-monad-laws-sketch
Regards,
Heinrich Apfelmus
--
http://apfelmus.nfshost.com
___
Haskell-Cafe mailing
.
Regards,
Heinrich Apfelmus
--
http://apfelmus.nfshost.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Will Ness wrote:
Heinrich Apfelmus writes:
Here an example where the VIP merge would give a different result
bad = tfold $ (1:10:undefined) : (2:3:5:undefined) : (4:undefined) :
error bad
We have
ghci bad
[1,2*** Exception: bad
but the VIP version would give
Will Ness wrote:
Heinrich Apfelmus writes:
Here an example where the VIP merge would give a different result
bad = tfold $ (1:10:undefined) : (2:3:5:undefined) : (4:undefined) :
error bad
We have
ghci bad
[1,2*** Exception: bad
but the VIP version would give
as it sounds, since we didn't know them well in the first place
anyway). More worryingly, changing the tree shape now affects correctness.
Regards,
Heinrich Apfelmus
--
http://apfelmus.nfshost.com
___
Haskell-Cafe mailing list
Haskell-Cafe
again.)
Regards,
Heinrich Apfelmus
--
http://apfelmus.nfshost.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
from
Haskell. Haskell itself (or rather the design committee) got the idea
from SASL (1976) and Miranda (1986), though it goes way back to the
1960s, as described in section 4.1 Layout of
http://www.haskell.org/haskellwiki/History_of_Haskell
Regards,
Heinrich Apfelmus
--
http
is very useful for avoiding capturing input in the second
argument of manyTill
Regards,
Heinrich Apfelmus
--
http://apfelmus.nfshost.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
everything that comes up on the fly. There is no better way to ensure
usability of an application than to write it while heavily using it (and
aiming for a large usability / features ratio).
Regards,
Heinrich Apfelmus
--
http://apfelmus.nfshost.com
to finishing it:
http://www.haskell.org/haskellwiki/Haskell_a_la_carte
Regards,
Heinrich Apfelmus
--
http://apfelmus.nfshost.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
C. McCann wrote:
Heinrich Apfelmus wrote:
Combined with = / you have multiple reading direction in the same
expression, as in
expression ( c . b . a ) `liftM` a1 = a2 = a3
reading order 6 5 41 2 3
That's why I'm usually using = instead of = .
Does
Malcolm Wallace wrote:
Heinrich Apfelmus wrote:
Personally, I would be much happier with the slogan HXT = XML
transformations with filters. Browsing through Manuel's thesis, I
discover that your combinators are quite slick ( , choiceA , when,
guards ), it's just that they are a very
f x `orElse` deep f x
Regards,
Heinrich Apfelmus
--
http://apfelmus.nfshost.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
= instead of = .
Regards,
Heinrich Apfelmus
--
http://apfelmus.nfshost.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
://www.haskell.org/HaXml/icfp99.html
but it appears to me that representing them as
type Filter a b = a - [b]
allows the use of the list monad, which would highlight the similarity
between list comprehensions and working with XML trees.
Regards,
Heinrich Apfelmus
--
http://apfelmus.nfshost.com
, but it is a more forthright
form of showing that your work is valued than a silent download or
virtual nod.
[1]: http://flattr.com
Regards,
Heinrich Apfelmus
--
http://apfelmus.nfshost.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http
revisit projects I value a lot every month anyway, which
boils down to a larger share in the end.
Regards,
Heinrich Apfelmus
--
http://apfelmus.nfshost.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo
Apfelmus
--
http://apfelmus.nfshost.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
(The link doesn't seem to work, only http://gwolf.org/blog is available.)
Regards,
Heinrich Apfelmus
--
http://apfelmus.nfshost.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
aditya siram wrote:
Ok, I feel dumb. I have the slides hosted elsewhere now and I can't
figure out how to change the Reddit link. Any help is appreciated!
You can't change the link on Reddit, but you can delete the old
submission and make a new one.
Regards,
Heinrich Apfelmus
--
http
(unless you are indeed a working
mathematician), his choice of topics and examples does not really help
understanding the Haskell side of category theory.
Regards,
Heinrich Apfelmus
--
http://apfelmus.nfshost.com
___
Haskell-Cafe mailing list
Haskell-Cafe
examples that use buildKeyPair and type classes can be
reformulated in terms of Key with this additional field. That's
because buildKeyPair actually expects a type argument; the cipher
filed merely shifts that argument to the value level.
Regards,
Heinrich Apfelmus
--
http
]:
http://www.reddit.com/r/haskell/comments/ar4wb/understanding_iteratees/c0j0f3r
Regards,
Heinrich Apfelmus
--
http://apfelmus.nfshost.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
- B.ByteString,
decrypt :: B.ByteString - B.ByteString,
keyLength :: BitLength,
serialize :: B.ByteString}
rsa :: RandomGen g = BitLength - g - ((Key,Key), g)
Regards,
Heinrich Apfelmus
--
http://apfelmus.nfshost.com
Daniel Fischer wrote:
Heinrich Apfelmus wrote:
Daniel Fischer wrote:
For many hashing or de/encryption algorithms, chunking is more natural
than single-character access.
Even when the chunk lengths are unpredictable? After all, unlike with
fread in C, you can't request the next chunk
Daniel Fischer wrote:
John Lato wrote:
Heinrich Apfelmus wrote:
Do you have an example where you want chunking instead of single
character access?
I am unable to think of any examples where you want chunking for any
reason other than efficiency.
For many hashing or de/encryption algorithms
the number of elements in the input
count :: Monad m = Iteratee m Int
count = go 0
where
go n = eof = \b - case b of
True - return n
False - symbol go $! (n+1)
Regards,
Heinrich Apfelmus
--
http://apfelmus.nfshost.com
Jason Dagit wrote:
Heinrich Apfelmus wrote:
I'm curious, can you give an example where you want to be explicit about
chunking? I have a hard time imagining an example where chunking is
beneficial compared to getting each character in sequence. Chunking
seems to be common in C for reasons
Nicolas Pouillard wrote:
Heinrich Apfelmus wrote:
There are also enumerators and enumeratees. I think that
purpose of enumerator =
run an iteratee on multiple sources
(i.e. first part of the input from a Handle ,
second part from a String )
I would say
xs
assuming a function
fromString :: String - Enumerator
To get an actual result from an Iteratee, we only need a way to run it
on the empty stream.
runOnEmptyString :: Iteratee a - Maybe a
Regards,
Heinrich Apfelmus
--
http://apfelmus.nfshost.com
[]
where
go xs EOF= Yield xs EOF
go xs (Chunk ys) = Continue $ go (xs++ys)
(using the API from http://ianen.org/articles/understanding-iteratees/ )
Regards,
Heinrich Apfelmus
--
http://apfelmus.nfshost.com
___
Haskell-Cafe
/okasaki/jfp98.ps
Regards,
Heinrich Apfelmus
--
http://apfelmus.nfshost.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
to the
iteratee abstraction.
Regards,
Heinrich Apfelmus
--
http://apfelmus.nfshost.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Luke Palmer wrote:
Heinrich Apfelmus wrote:
Conal Elliott wrote:
For anyone interested in iteratees (etc) and not yet on the iteratees
mailing list.
I'm asking about what iteratees *mean* (denote), independent of the
various implementations.
In my world view, iteratees are just a monad M
Ertugrul Soeylemez wrote:
Heinrich Apfelmus wrote:
In particular, the World - (a,World) model is unsuitable even without
concurrency because it cannot distinguish
loop, loop' :: IO ()
loop = loop
loop' = putStr c loop'
I interpret the EDSL model to be the operational semantics
,
Heinrich Apfelmus
--
http://apfelmus.nfshost.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Backhouse, P Jansson, J Jeuring, L Meertens
Generic Programming - An Introduction -
http://www.cse.chalmers.se/~patrikj/poly/afp98/
A corresponding chapter in the wikibook (Datatype algebra) has not
been written, so far.
Regards,
Heinrich Apfelmus
--
http://apfelmus.nfshost.com
, say
product [1..5] - 1 * product [2..5] - .. - 120
is a proof that the initial and the final expression denote the same value.
The Curry-Howards correspondence is about the type system, viewing types
as logical propositions and programs as their proofs.
Regards,
Heinrich Apfelmus
such problems.
As Michael already mentioned, the problem is undecidable in general
since it includes group rings.
Regards,
Heinrich Apfelmus
--
http://apfelmus.nfshost.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman
Gregory Crosswhite wrote:
Heinrich Apfelmus wrote:
Gregory Crosswhite wrote:
You're correct in pointing out that f uses memoization inside of
itself to cache the intermediate values that it commutes, but those
values don't get shared between invocations of f; thus, if you call
f
might get
reconstructed redundantly. (However, there are other strategies for
memoization that are persistent across calls.)
It should be
f = \n - memo ! n
where
memo = ..
so that memo is shared across multiple calls like f 1 , f 2 etc.
Regards,
Heinrich Apfelmus
--
http
can also use a toy implementation like
type Graph = [(Node, -- Department
[Node]) -- List of Departments it shares revenue to
]
To test whether a graph has cycles (looping mapping), you can use a
depth-first search.
Regards,
Heinrich Apfelmus
--
http
:
ContextDTree a = List (DList (a * DTree a) * a)
After all, what you describe is only the context of DTree a within a
single level, but it might be many levels down in the tree.
Regards,
Heinrich Apfelmus
--
http://apfelmus.nfshost.com
___
Haskell-Cafe
the derivative of List
first:
List' x = List x * List x
and then you can use the chain rule to find DTreeF .
Regards,
Heinrich Apfelmus
--
http://apfelmus.nfshost.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman
,
Heinrich Apfelmus
--
http://apfelmus.nfshost.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
101 - 200 of 837 matches
Mail list logo