Once you have a guess, try testing it with these examples! > let (!x, y) = undefined in True > let (!x, y) = undefined in y > let (!x, y) = undefined in x
-
-
Prikaži ovu nitHvala. Twitter će to iskoristiti za poboljšanje vaše vremenske crte. PoništiPoništi
-
-
-
let (x,y) = k in x `seq` z Just a guess
-
That was my initial guess as well! but it actually behaves differently > let (!x, y) = undefined in True True > let (x, y) = undefined in x `seq` True *** Exception: Prelude.undefined
Kraj razgovora
Novi razgovor -
-
-
I'd go for let (x,y) = case k of (x,_) -> seq x k in z Was much harder to write out than to devise. I've been bitten by the converse recently. (a nested lazy pattern that behaved surprisingly)
-
this is pretty much it, yes :D it's still a bit weird to me that internal bang patterns are so different than external ones, but I suppose it makes sense in the grand scheme of things.
- Još 1 odgovor
Novi razgovor -
-
-
The answer is here: https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/glasgow_exts.html#extension-BangPatterns … with more details here: https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/glasgow_exts.html#recursive-and-polymorphic-let-bindings … Worth studying in detail.
Hvala. Twitter će to iskoristiti za poboljšanje vaše vremenske crte. PoništiPoništi
-
-
-
Looks like js (:
Hvala. Twitter će to iskoristiti za poboljšanje vaše vremenske crte. PoništiPoništi
-
Čini se da učitavanje traje već neko vrijeme.
Twitter je možda preopterećen ili ima kratkotrajnih poteškoća u radu. Pokušajte ponovno ili potražite dodatne informacije u odjeljku Status Twittera.