Open paf31 opened 8 years ago
I'd be interested in that, but I'm not sure I understand laziness well enough in Purescript at the moment. Is it best just to read the information on purescript-lazy?
purescript-lists
currently defines two different modules, one strict, and one lazy using purescript-lazy
. It's difficult to share one implementation and keep things stack-safe, while keeping all lazy operations lazy. So perhaps that's the way to go here as well.
Hm, I'll take a look. Thanks!
I'm looking into this one...
Help needed with testing
For map
the Strict version throws and Lazy does not in the following code (not in psci
however, don't know why):
import Control.Monad.Eff.Exception.Unsafe (unsafeThrow)
import Data.IntMap.Lazy (singleton)
import Prelude (($), map)
m = map (_ $ 1) $ singleton 1 (\_ -> unsafeThrow "ERR")
Is this sufficient?
How about testing insert
?
ping
Is it even possible to test insert on it's own for laziness?
Would you be interested in adding a lazy
IntMap
implementation? It would really help to simplify some things inpurescript-memoize
related to memoizing functions of integers.Thanks!