Michael Roth wrote:
Did you mean:isolate :: Stack s1 a -> Stack s2 a isolate stack = Stack f where f xs = ( fst $ run stack [], xs)
Yes. What's slightly interesting is the way the types promise the isolation: the Stack s1 action clearly can't be consuming any of the [s2] stack, because that is the wrong type. This continues to hold even if you happen to run it with s1 == s2.
Jules _______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
